ttl: stabilize TestCancelWhileScan runtime#67657
ttl: stabilize TestCancelWhileScan runtime#67657zanmato1984 wants to merge 2 commits intopingcap:masterfrom
Conversation
|
@zanmato1984 I've received your pull request and will start the review. I'll conduct a thorough review covering code quality, potential issues, and implementation details. ⏳ This process typically takes 10-30 minutes depending on the complexity of the changes. ℹ️ Learn more details on Pantheon AI. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @zanmato1984. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughTest updated to use batched multi-row inserts (1,000 rows in 10 batches of 100), enable the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.11.4)Command failed 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. Comment |
zanmato1984
left a comment
There was a problem hiding this comment.
Role: Reviewer-R1
LGTM (round 1).
Checks:
- Original test intent is preserved: TestCancelWhileScan still asserts cancellation completes within 1s after cancel().
- Change scope is test-only and minimal: only pkg/ttl/ttlworker/scan_integration_test.go is updated.
- Recurrence analysis is consistent with evidence from the reopened flaky issue/build logs: current recurrence is timeout/runtime pressure rather than statement-boundary correctness.
- No unnecessary timing-only precise repro is retained: this update simplifies the stress profile and keeps deterministic cancellation coverage without extra reproducer-only paths.
Validation:
- ./tools/check/failpoint-go-test.sh pkg/ttl/ttlworker -run '^TestCancelWhileScan$' -count=20 (pass)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #67657 +/- ##
================================================
- Coverage 77.5871% 77.3567% -0.2305%
================================================
Files 1981 1965 -16
Lines 547950 551723 +3773
================================================
+ Hits 425139 426795 +1656
- Misses 122001 124914 +2913
+ Partials 810 14 -796
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| testStart := time.Now() | ||
| testDuration := time.Second | ||
| rounds := 10 | ||
| if testflag.Long() { |
There was a problem hiding this comment.
Long mode doesn't affect the CI, so I don't think this change will be helpful.
There was a problem hiding this comment.
Good point. I removed the testflag.Long() branch so CI and local runs now execute the same loop count (rounds := 10), while keeping the original cancellation assertion and test intent unchanged.
Validation:
./tools/check/failpoint-go-test.sh pkg/ttl/ttlworker -run "^TestCancelWhileScan$" -count=1(pass)make lint(pass)
Included in commit 10aeb41daf.
What problem does this PR solve?
Issue Number: ref #66982
Problem Summary:
TestCancelWhileScanstill times out in CI under resource pressure. The previous fix in #67285 addressed statement-boundary cancellation correctness, but this test still spent too much time in long-mode stress setup/execution and could exceed shard timeout.What changed and how does it work?
This PR keeps the same cancellation assertions and makes the stress path cheaper and more deterministic:
TestCancelWhileScaninstead of issuing 10k single-row inserts.10default,30in-long) instead of time-based loops.sleepCoprRequest=200ms) so each round still exercises cancellation while avoiding heavy table size/time requirements.This keeps the regression coverage focused on cancellation responsiveness while removing the long-tail runtime behavior that caused timeouts.
Check List
Tests
Side effects
Documentation
Release note
Summary by CodeRabbit
Release Notes
This release contains internal test improvements with no user-facing changes.