MPP: fix report status error when local RU is not initialized#10963
Conversation
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
|
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 (5)
📝 WalkthroughWalkthroughRU consumption is now synced into execution responses before serialization, and SegmentReadTaskScheduler is stopped earlier during shutdown. The collector now reuses its RU optional in place, and tests cover RU output and scheduler-related teardown behavior. ChangesRU consumption sync
SegmentReadTaskScheduler shutdown
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant MPPTaskStatistics
participant ExecutorStatisticsCollector
MPPTaskStatistics->>ExecutorStatisticsCollector: sync RU info
MPPTaskStatistics->>MPPTaskStatistics: generate execution summary
MPPTaskStatistics->>MPPTaskStatistics: generate TiFlash execution info
Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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. Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gengliqi, xzhangxian1008 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:
|
|
/test pull-integration-test |
|
/test pull-integration-test |
|
/test pull-unit-test |
2 similar comments
|
/test pull-unit-test |
|
/test pull-unit-test |
|
/retest |
|
/test pull-unit-test |
…te+mergeDeltaAll (pingcap#10898) close pingcap#10897\n\nSigned-off-by: JaySon-Huang <tshent@qq.com>
…gmentReaderPoolManager shutdown (pingcap#10917) close pingcap#10903\n\nAdd a public `stop()` method to `SegmentReadTaskScheduler` that sets the stop flag and joins the background thread. Call it **before** `SegmentReaderPoolManager::stop()` in both production (`Server.cpp`) and test (`gtests_dbms_main.cpp`) shutdown paths. - `SegmentReadTaskScheduler.h`: expose `stop()` as public method; rename `std::atomic<bool> stop` → `stop_flag` to avoid name collision - `SegmentReadTaskScheduler.cpp`: implement `stop()`, destructor delegates to it - `Server.cpp`: call `SegmentReadTaskScheduler::instance().stop()` before `SegmentReaderPoolManager::instance().stop()` - `gtests_dbms_main.cpp`: same reorder Also fix two minor typos along the way: - `reapPeningPools` → `reapPendingPools` in class comment - `max_free_threds` → `max_free_threads` in test main
4b2815a
into
pingcap:feature/release-8.5-materialized-view
What problem does this PR solve?
Issue Number: ref #10962
Problem Summary:
When TiFlash reports MPP task status with execution summaries enabled,
ExecutorStatisticsCollector::fillLocalExecutionSummariesexpects local RU consumption to be initialized. Some task paths can generate TiFlash execution info beforeMPPTaskStatistics::setRUInfois called, so reporting status may fail withCheck local_ru failed: local ru consumption info not setupand hide the original task status.What is changed and how it works?
ExecutorStatisticsCollectorbefore generating MPP execution summaries.setRUInfofirst.Check List
Tests
Added unit test:
ExecutionSummaryTestRunner.genMPPTaskExecutionInfoWithoutSetRUInfo.Side effects
Documentation
Release note
Summary by CodeRabbit
Bug Fixes
Tests
Chores