Repository navigation
fix(master): pay back the running-pool gauge on task panic - #353
Merged
Merged
Conversation
lance-format#348 incremented the running gauge before spawning the task and decremented it after run_task returned. A panic inside run_task unwinds past the decrement; the permits are released by Drop but the gauge stays elevated, so the pool reads as consumed forever. Hold the decrement in a Drop guard so unwinding pays it back. Refs lance-format#333. Review finding 5 on lance-format#348. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
17 of 18 tasks
beinan
added a commit
that referenced
this pull request
Oct 8, 2026
…ted (#360) Part of #333. Closes the `claiming` cancellation gap noted in review round 4 (credit: production review). The `claiming` gauge was incremented before the etcd claim and decremented after. A poller aborted mid-claim (drain, shutdown, test teardown) skipped the decrement. Same `GaugeHold` Drop guard as #353, held across the await. Clippy `-D warnings`, fmt clean; poller test passes against etcd. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
Part of #333. Fixes review finding 5 (panic path) on #348 (credit: production review).
Problem
running.incrementbefore spawn,running.decrementafterrun_taskreturns. A panic inrun_taskunwinds past the decrement: permits are released byDrop, the gauge is not, somaster_task_pool_in_use{state="running"}reads as consumed forever.Fix
GaugeHold(Gauge)withDrop→ decrement, held acrossrun_task. Three lines.Validation
Type-level: the decrement is now in
Drop, which runs on both normal return and unwind. No new test — asserting on ametrics::Gaugevalue needs a recorder harness this crate's tests do not have; the existing poller test (reserved_resident_merge_finishes_while_legacy_pool_is_saturated) passes against etcd, clippy-D warningsand fmt clean.🤖 Generated with Claude Code