Repository navigation
fix: release compact writer ownership before stats refresh - #309
Merged
Merged
Conversation
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.
Production compaction still retained table writer ownership while waiting up to 10 seconds for the global
stats-writerlock. After #308, nine production commit-phase observations averaged 12.51 seconds despite file encoding already running outside ownership.Finish successful prepared compactions durably before reopening a read handle and refreshing statistics. This releases the existing task/table keys through the normal completion transaction; it does not bypass fencing, drain guards, or dedicated publishers. Keep the caller's task and compaction permits through refresh to bound concurrency, and report its latency separately as
stats_refresh. No-op preparations and failed publication/completion skip refresh. A crash after completion may omit the best-effort compaction counter update; scans still refresh table counts.Validation: add an etcd-backed regression covering owned and legacy publication with a competing stats writer. The Compact must become Done and the next MergeWal must acquire the table while refresh is blocked; the local compaction permit remains occupied until refresh finishes. Validation passed locally: all 139 master library tests including the full etcd HA suite (0 failures); focused prepared-compaction tests 4/4; master Clippy all targets with warnings denied; formatting and diff whitespace checks. GitHub CI is running.