Repository navigation
test(embed): renew SQL deadline after restart admission - #29398
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? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep review of 47e17587fb0dced0a18631e98d9f98dfd64b44f9, with current main a73f14eee3e6e36bd987d11beee35b329de6d5cf and merge-base 9c6fcb5b501d040ab1bcb5ada139939770468638: no blocking findings.
The full diff is one test file, +12/-15. The fix addresses the cause of the reported CI failure: the pre-shutdown SQL deadline previously continued expiring while cluster.Start() reacquired runner-wide admission. A separate context created after successful restart gives the verification phase its own bounded SQL budget. Every post-restart SQL operation uses that context. Accepted-commit, all-or-nothing durability and subsequent-write assertions are retained unchanged.
| Closure | Review result |
|---|---|
| Context ownership / failure cleanup (Q1) | Both contexts have deferred cancellation, including assertion FailNow; the first is also canceled before restart. Deferred cancellation runs before t.Cleanup, which releases WAIT fault points, joins workers and closes registered DBs/cluster. DB registration precedes Ping, so Ping failure remains cleanable. |
| Wait / restart boundary (Q2) | Admission wait is excluded from both SQL budgets. Existing commit/shutdown waits and barriers remain intact. This patch does not bound the shared admission wait itself; it fixes the expired SQL context after that wait completes. |
| Retained resources (Q3) | One additional bounded-lifetime context/timer; no new worker, queue, retained collection or fixture. |
Engineering/performance: minimal local fix, net three lines removed, no production hot-path or protocol change, no extra cluster startup, sleeps or retry loop. An ordinary test-maintenance fix does not need a design document or a new BVT. Reproducing the queue delay by adding a multi-minute sleep would be unnecessary test cost. This PR appropriately references rather than closes #28012/#28013: it repairs test infrastructure and does not establish that those broader production issues are fully resolved.
Evidence: inspected the complete diff and unchanged dependent fixture/admission/DB-cleanup paths; diff check passed. GitHub checks report the Ubuntu UT job and arm64 SCA job passed. The PR body reports focused coverage/race and owning-package passes; those local runs were not independently rerun in this review. Skipped coverage/upgrade checks are not treated as passes. No new runtime tests or production changes were made.
Merge Queue Status
This pull request spent 41 seconds in the queue, with no time running CI. ReasonPull request #29398 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Waiting for any of
All conditions
Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
Refs #28012, #28013, and the CI failure on #29254. This does not close either issue.
Review notes
The UT coverage job failed in
TestIssue28012And28013AcceptedCommitDuringStandaloneShutdownafter the restarted cluster waited 2m15s to reacquire shared embedded-cluster admission. Its pre-shutdown SQL context had a two-minute deadline; the first post-restartPingContexttherefore receivedcontext deadline exceeded. The coverage aggregator failed only because this UT producer did not publish a complete profile.Validated on current main using the existing Pixi GCC 14 toolchain, without a container: exact test selected and passed with coverage (20.2s) and race (24.7s); the owning
pkg/tests/issues/isolatedpackage passed (167.9s). Incrementalgo vet,golangci-lint, gofmt, and diff checks passed. Full CI is pending on this PR.What this PR does / why we need it:
Give post-restart SQL verification a fresh two-minute context only after the embedded cluster reacquires admission. Cancel the pre-shutdown context when that phase ends and retain all accepted-commit, durability, and cleanup assertions.