Repository navigation
[VID-1643] go-cacher: don't wait for retained SH when publishing an object - #9
Closed
atoppi wants to merge 1 commit into
Conversation
…bject Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
Closing: opened from a personal fork by mistake. The fix will go in via a maintainer branch (VID-1643). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes ~10 minute (
-lock-timeout) stalls on the stream_ci_k3s runners when twogo-cacherhelpers on the same host publish the same new object. Linear: VID-1643.Bug (from PLA-320):
DiskCache.Putdrops SH and then waits for EX. If another helper publishes the object in that gap, it keeps SH until its process exits (HoldOpen). The first helper then waits for the full lock timeout. Two helpers can block each other this way: video-sfu parallel release builds, andgo test -coverwith itscovdatachildren.Fix: while waiting for EX, also try a non-blocking SH. If the object is now valid, use it. Objects are content-addressed, so the published copy is correct.
Tests:
cachers/disk_publish_test.goadds a deterministic case and a two-helper stress test. Before the fix, the stress test hit the lock timeout in 10/20 runs. After the fix, 0/20.After merge, bump the
go-cacher@<sha>pin instream-infra/stream_ci_k3s/images/runner/Dockerfile.chat*.🤖 Generated with Claude Code