test: fix flaky DisaggReadSnapshot — skip background tasks during write+mergeDeltaAll - #10898
Conversation
…g setup skip_check_segment_update prevents write() from scheduling background flush/merge tasks, avoiding a race where background placeDeltaIndex or merge delta holds is_updating and causes mergeDeltaAll() to fail silently, resulting in 5 persisted column files instead of the expected 4. Close #10897.
|
@JaySon-Huang 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. |
|
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 as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe test DisaggReadSnapshot now enables the ChangesTest Stabilization via Failpoint Control
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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. 🔧 Infer (1.2.0)dbms/src/Storages/DeltaMerge/tests/gtest_segment_read_task.cppdbms/src/Storages/DeltaMerge/tests/gtest_segment_read_task.cpp:15:10: fatal error: 'Common/Logger.h' file not found ... [truncated 2200 characters] ... characters 6-141 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 |
Signed-off-by: JaySon-Huang <tshent@qq.com>
|
/test pull-integration-test |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JinheLin, Lloyd-Pottiger 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:
|
|
/cherry-pick release-nextgen-202603 |
|
@JaySon-Huang: new pull request created to branch DetailsIn response to this:
Instructions 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 ti-community-infra/tichi repository. |
…te+mergeDeltaAll (pingcap#10898) close pingcap#10897\n\nSigned-off-by: JaySon-Huang <tshent@qq.com>
…te+mergeDeltaAll (pingcap#10898) close pingcap#10897\n\nSigned-off-by: JaySon-Huang <tshent@qq.com>
…te+mergeDeltaAll (pingcap#10898) close pingcap#10897\n\nSigned-off-by: JaySon-Huang <tshent@qq.com>
|
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: close #10897
Problem Summary:
DMStoreForSegmentReadTaskTest.DisaggReadSnapshotis flaky — the initialwrite(4096)schedules a background flush taskwhose completion handler (
placeDeltaIndex) and follow-up background merge delta both acquireis_updatingonDeltaValueSpace. WhenmergeDeltaAll()runs before these background tasks release the lock, it fails silently,leaving 5 persisted column files instead of the expected 4.
What is changed and how it works?
Enable
skip_check_segment_updatefailpoint before the initialwrite(4096)+mergeDeltaAll()block in the test,with a scoped guard that disables it on exit. This prevents
checkSegmentUpdatefrom scheduling any backgroundflush/merge tasks during the setup phase, eliminating the race entirely.
This is consistent with other tests in the same file (
fetchPagesNoTinyNoInMem,fetchPagesTinyNoInMem,fetchPagesTinyInMem) which already enableskip_check_segment_updateviadisableFlushCache()before theirwrite+mergeDeltaAll blocks.
Check List
Tests
Side effects
Documentation
Release note
Summary by CodeRabbit