Repository navigation
test: take 128+SIGINT as graceful exit in graceshutdown test - #71651
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe shutdown test helper now treats process exit status 128 + SIGINT as a graceful stop. Other ChangesShutdown test
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~5 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to This test-only change recognizes the server’s SIGINT exit code as a graceful stop. The supplied evidence supports that mapping, and no concrete merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit checks the signal’s trail, Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #71651 +/- ##
================================================
- Coverage 76.2984% 72.0264% -4.2721%
================================================
Files 2041 2110 +69
Lines 554492 603938 +49446
================================================
+ Hits 423069 434995 +11926
- Misses 130523 167193 +36670
- Partials 900 1750 +850
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
/test pull-e2e-test |
wjhuang2016
left a comment
There was a problem hiding this comment.
Reviewed the complete merge-base diff at 0641629. No P0/P1 findings. The test sends SIGINT, and the server returns 128+SIGINT after its shutdown path completes. Other non-zero exit codes remain failures, and the transaction completion assertions are preserved. Static review only; no local builds or tests were run. The current build, unit-test, and e2e checks are successful.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bb7133, wjhuang2016 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
What problem does this PR solve?
Issue Number: ref #67765
The user wants the same two paragraphs but with the section titles included. Output only the paste-ready content with the headings.
Problem Summary
Since #68096, tidb-server exits with code
128+SIGINT(130) after a SIGINT-triggered graceful shutdown, instead of 0.tests/graceshutdownstops tidb-server by sendingos.Interrupt, socmd.Wait()now returns anExitError("exit status 130"). Because this assertion (require.NoError) runs in a background goroutine, the failure callsruntime.Goexit()beforeclose(done), leaving the main test goroutine blocked at<-doneuntil the 10-minutego testtimeout. This has been failing themerged_e2e_testJenkins job since #68096 was merged, with no error message visible in the logs (testify output is never flushed because the test goroutine never returns).What changed and how does it work
stopServiceintests/graceshutdownnow treats exit code128+SIGINTas a graceful stop: whencmd.Wait()returns an error, it comparescmd.ProcessState.ExitCode()with128+int(syscall.SIGINT)(the same value asexitCodeIntincmd/tidb-server/main.go). Since SIGINT is exactly the signal the test itself sends to stop the service, this exit code means the shutdown completed gracefully. Any other non-zero exit (crash, killed by signal, etc.) is still reported as a test failure.Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Summary by CodeRabbit