Skip to content

[VID-1643] go-cacher: don't wait for retained SH when publishing an object - #9

Closed
atoppi wants to merge 1 commit into
GetStream:multi-serverfrom
atoppi:atoppi/vid-1643-go-cacher-put-stalls-for-lock-timeout-when-another-helper
Closed

atoppi wants to merge 1 commit into
GetStream:multi-serverfrom
atoppi:atoppi/vid-1643-go-cacher-put-stalls-for-lock-timeout-when-another-helper

Conversation

@atoppi

@atoppi atoppi commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Fixes ~10 minute (-lock-timeout) stalls on the stream_ci_k3s runners when two go-cacher helpers on the same host publish the same new object. Linear: VID-1643.

Bug (from PLA-320): DiskCache.Put drops 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, and go test -cover with its covdata children.

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.go adds 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 in stream-infra/stream_ci_k3s/images/runner/Dockerfile.chat*.

🤖 Generated with Claude Code

…bject

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@atoppi

atoppi commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator Author

Closing: opened from a personal fork by mistake. The fix will go in via a maintainer branch (VID-1643).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant