What are the disadvantages of sharding?
Golang
What delivery guarantees does Kafka have? What needs to be done on the producer to achieve exactly-once?
[name] asked: Are you still studying? Will it interfere with full-time work?
func main() { c := make(chan int, 1000) for i := 0; i < 100; i++ { go foo(c) } sum := 0 for r := range c { sum += r } fmt.Println(sum) } func foo(c chan int) { r := rand.Int() for i := 0; i < r; i++ { c <- r } } --- func main() { c := make(chan int, 1000) var wg sync.WaitGroup wg.Add(100) for i := 0; i < 100; i++ { go func() { defer wg.Done() foo(c) }() } go func() { wg.Wait() close(c) }() sum := 0 for r := range c { sum += r } // // fmt.Println(sum) } func foo(c chan int) { r := rand.Int() for i := 0; i < r; i++ { c <- r } }
What are you currently looking for in a new job?
Tell me about Consumer Group. How are 3 partitions and 2 consumers distributed?
What happens to a slice in Go if its capacity is 8 and we try to add a ninth element?
Given sorted arrays in ascending order: - suspects - innocents Exclude all innocents from suspects. Examples: Input: suspects = [1, 2, 3, 4, 5], innocents = [2, 4] Output: [1, 3, 5] Input: suspects = [3, 80, 123, 421, 936], innocents = [80, 936] Output: [3, 123, 421]
[name] asked: Tell me about the team and processes — is it a cross-functional team, how do sprints work?
/* Given an array of numbers nums of length n, each number can be either unique or appear twice. Numbers are in the range [1, n]. Write a function that returns an array of numbers that appear twice. Examples: Input: nums = [4, 3, 2, 7, 8, 2, 3, 1] Output: [2, 3] Input: nums = [2, 2, 1] Output: [2] */
Indexing in PostgreSQL: how to create an index for a query with multiple parameters? Why did the index degrade after six months with active updates?
What indexes do you know in the database?
[name] asked: Tell me about your current workplace — what kind of company is it, what product are you working on?
Can you increase the number of partitions in Kafka without recreating the topic?
How do you feel about relocation and where did you plan to move?
func main() { c := make(chan int, 1000) var wg sync.WaitGroup wg.Add(100) for i := 0; i < 100; i++ { go func() { defer wg.Done() foo(c) }() } go func() { wg.Wait() close(c) }() sum := 0 for r := range c { sum += r } // fmt.Println(sum) } func foo_req(c chan int) error { r := rand.Int() for i := 0; i < r; i++ { c <- r } }
Do you understand correctly that with cache-aside, we still need to go to the cache and invalidate data there when updating data in the database?
[name] asked: Why did you switch from your previous company to your current one?
Which command helps to update statistics in PostgreSQL?
What is the difference between JSON and Protobuf?