bazelbuild / bazel-buildfarm

Bazel remote caching and execution service
https://bazel.build
Apache License 2.0
635 stars 199 forks source link

Prevent write completion starvation for duplicates #1754

Closed werkt closed 1 month ago

werkt commented 1 month ago

When a duplicate output stream is detected, we must signal the writeWinner (because the write exists) and onInsert (because it was inserted) for an output stream creation. If we're racing, we should be eventually convergent, but this absolutely fixes a hang which occurs on this sentinel stream's return into getOutput, where the future might never be triggered otherwise.