Sobes.tech

Why should you not create a separate goroutine for each URL when checking terminals?

141

How would you verify that the added index is really working well, especially in production?

141

Did the readings go with the master, with the replicas, or how were they distributed?

139

Have you used keys for partitioning in Kafka?

137

Can you recall a situation when something broke and what you did?

136

In what order will goroutines execute and why?

134

// Fix the code func FixProblem() { var wg sync.WaitGroup ch := make(chan string, 5) mu := sync.Mutex{} for i := 0; i < 5; i++ { wg.Add(1) go func(ch<- string, i int, wg *sync.WaitGroup) { defer wg.Done() mu.Lock() defer mu.Unlock() msg := fmt.Sprintf("Goroutine %s", strconv.Itoa(i)) ch <- msg }(ch, i, &wg) } for { select { case q := <-ch: fmt.Println(q) } } wg.Wait() }

129

Tell about a case when you proposed an initiative and defended it.

129

If requests are lost during pod updates — how did you solve it?

128

How did you implement the Kafka client in your project, how did you use it?

128

package main import "fmt" func main() { nums := make([]int, 1, 2) fmt.Println(nums) // appendSlice(nums, 1024) fmt.Println(nums) // mutateSlice(nums, 1, 512) fmt.Println(nums) // } func appendSlice(sl []int, val int) { sl = append(sl, val) } func mutateSlice(sl []int, idx, val int) { sl[idx] = val }

127

Have tasks always been well described? How did you act if the description was incomplete?

125

What happens to old and new keys when the map grows? Why not copy everything at once?

119

Have you ever adjusted the number of partitions within a Kafka topic?

116
/12