Repository navigation
fix(collab): cancel shutdown storage waits - #335
Merged
Merged
Conversation
runbear-bot
approved these changes
Nov 3, 2026
runbear-bot
left a comment
Collaborator
There was a problem hiding this comment.
Bobb's bot(Totoro) Review
Conclusion: ready-with-notes
Reviewed head: 87f3d2bc32fb4d845c90ae790561793f312e8d59
- No merge-blocking defect found in the shutdown cancellation, local CAS, co-editing room cleanup, lease renewal, snapshot, or concurrent-write paths.
- Independent OMX review also found no blocker after inspecting the changed paths and direct consumers.
- Verification:
git diff --checkpassed. - Repository tests,
go vet ./..., andgo build ./...: not run (0 / 0 / 0) because the Go toolchain is unavailable in this environment. GCS/S3/network filesystem, Cloud Run signal delivery, and ygo shutdown internals remain unverified.
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.
TL;DR
Root cause
Local file CAS used a blocking flock that ignored its context. Shutdown could therefore remain blocked after its deadline, and background lease or snapshot work could keep using uncancelable contexts. The SQL release test also exposed a non-atomic fixture publication path that could leave a durable invalid-data row.
Changes
QA checklist
TestLocalCASLockCancellationPreservesHolderAndBytes,TestLocalCASAlreadyCanceledContextDoesNotWriteOrHoldLockTestCollabCloseCancelsContendedFileCAS,TestCollabCloseWritesLiveRoomsTestDataQuerySQLReportsAPassThatMissedAFileVerification
Final local head:
87f3d2bc32fb4d845c90ae790561793f312e8d59.go vet ./...: passed.go build ./...: passed.go test ./... -count=1 -timeout=45m: passed on Go 1.25.8, Darwin arm64.f9fd8830; the healthy CAS and graceful-close controls pass. The pre-fix shutdown test remains blocked until the external lock guard, while the fixed test returns with the external holder still protecting its lock.Behavior and limits
A canceled CAS wait now returns its context error without unlocking another writer or changing bytes. Normal graceful shutdown still writes an uncontended dirty room. The change does not add a public API, configuration setting, dependency, or new timeout policy.
The shutdown probe covered the real local file backend. GCS, S3, network filesystems, Cloud Run signal delivery, and ygo shutdown internals remain unverified. The original SQL CI incident's exact branch remains inconclusive, while the non-atomic fixture hazard is confirmed and corrected. Existing browser, Windows, and unrelated symlink limitations remain outside this PR.
Not changed
Release status
v0.18.2 remains unpublished until this fix is reviewed, merged, PR334 is rebased or otherwise revalidated, and all release gates pass.