Repository navigation
fix: park TAE worker shutdown and defer waiter allocation - #32915
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
This pull request is merged. |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 7ed5b6a415ec527b5770ef5c13b9af8d4591de52
Assessment: approve
Worker shutdown now parks until admitted operations finish or rejected reservations roll back. All concurrent stop callers observe the same completion signal. Transaction waiters allocate a channel only when a caller waits on a nonempty generation, preserving cancellation and isolation between generations.
Model: gpt-6.2-sol / xhigh
Session: 01a1f0a0-5126-78f3-9ab8-ef4e87f2f119 · slot 0 · generation 3
Validation:
-
The worker, tasks, and txnbase packages passed normal tests, race tests, and go vet. Nine focused worker, handler, and waiter tests each passed 100 race repetitions.
-
The database mode-switch regressions passed 10 race repetitions for draining in-flight catalog events and 100 for rollback after cancellation.
-
Across five local samples per revision, median process CPU during a 250 ms held shutdown fell from 249.1 ms to 0.092 ms. Unwatched transaction generations went from 112 bytes and one allocation to zero. The accepted-send control was allocation-free on both revisions and its timing ranges overlapped.
-
The source remained clean. All 23 check receipts and their retained logs are indexed in validation-reconciliation.json.
Limitations:
-
The performance measurements cover local component probes. Production CPU savings and sustained queue throughput were outside their scope.
-
The frozen CI snapshot showed the shared build, x86 unit tests, and arm64 static analysis still in progress.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #32278 (C20 and C21; the umbrella issue remains open).
What this PR does / why we need it:
On the same local Go toolchain and Apple M4, five 1-second held-operation samples had median process CPU of 960.9 ms on the base and 0.035 ms with the change. Five no-wait transaction-generation samples went from 112 B and 1 allocation per generation to 0 B and 0 allocations. The benchmark samples share a process per revision and are local microbenchmarks, not production measurements. The accepted-send control remained allocation-free; throughput samples were noisy.
Validation
TestTxnModeSwitchDrainsInflightCatalogEventsandTestTxnModeSwitchWaitCancelRollsBack.go vetandgolangci-lint.