Does this timeout mean everything will still finish? In other words, can something still not work — what is the problem here?
Golang
Suppose we have a high load, millions of clients, and your request starts to take a very long time. What will you do? How will you determine that it operates in constant time?
Can you tell me how you chose the algorithm for generating a short link?
How do timeouts affect reducing the load on analytics?
How to do this at the Go level — in idea, to send a response to the user and simultaneously send data to analytics?
Tell me about a project at Avito — position (mid/senior), what tasks did you solve?
Why are triggers mainly used for legacy systems?
What can be said about reading speed when an index is present?
What are the references you used?
What type will this counter have?
Tell me if there are any indexes in this table?
What will the program output? Why? ```go func main() { timeStart := time.Now() _, _ = <-worker(), <-worker() println(int(time.Since(timeStart).Seconds())) } func worker() chan int { ch := make(chan int) go func() { time.Sleep(3 * time.Second) ch <- 1 }() return ch } ```
So, your in-memory solution uses a mutex. Can you explain what it is and which one you used?
What salary expectations do you have? How was your previous income built (salary, bonuses)? Are you willing to consider total income including bonuses?
You also said that we will use inner join. Why? Could we have used left join instead? How does left join differ from right join?
Is the timeout the same for everyone? How will this timeout be calculated?
What are the criteria for choosing a new workplace — what are you looking for?
How is the absence of collision achieved in different solutions — in-memory and in the database?
What will this code output, and why? ```go package main import "fmt" func main() { lst := []string{"a", "b", "c", "d"} for k, v := range lst { if k == 0 { lst = []string{"aa", "bb", "cc", "dd"} } fmt.Println(v) } } ```
What do you think is the overall problem with in-memory solutions? What happens if the service is restarted?