-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](executor) Fix time-sharing task executor don't re-schedule when exceeded concurrency limit case. #57833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
morningman
merged 1 commit into
apache:master
from
kaka11chen:fix_time_sharing_task_executor_concurrency
Nov 14, 2025
Merged
[fix](executor) Fix time-sharing task executor don't re-schedule when exceeded concurrency limit case. #57833
morningman
merged 1 commit into
apache:master
from
kaka11chen:fix_time_sharing_task_executor_concurrency
Nov 14, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
… exceeded concurrency limit case.
bcb9f25 to
4f3de8c
Compare
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 35639 ms |
TPC-DS: Total hot run time: 185689 ms |
ClickBench: Total hot run time: 27.99 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
morningman
approved these changes
Nov 14, 2025
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
CalvinKirs
approved these changes
Nov 14, 2025
Contributor
|
run check_coverage |
github-actions bot
pushed a commit
that referenced
this pull request
Nov 14, 2025
… exceeded concurrency limit case. (#57833) ### What problem does this PR solve? Problem Summary: ### Release note Fix time-sharing task executor don't re-schedule when exceeded concurrency limit case. The time-sharing task executor needs the state of `ScanTask` to track split scheduling and determine whether to schedule it as the first time by `enqueue_splits` or reschedule it by `re_enqueue_split`. ``` virtual Status submit_scan_task(SimplifiedScanTask scan_task) override { if (!_is_stop) { std::cout << "submitting scan task to task executor scheduler, context id: " << scan_task.scanner_context->ctx_id << std::endl; std::shared_ptr<SplitRunner> split_runner; if (scan_task.scan_task->is_first_schedule) { split_runner = std::make_shared<ScannerSplitRunner>("scanner_split_runner", scan_task.scan_func); RETURN_IF_ERROR(split_runner->init()); auto result = _task_executor->enqueue_splits( scan_task.scanner_context->task_handle(), false, {split_runner}); if (!result.has_value()) { LOG(WARNING) << "enqueue_splits failed: " << result.error(); return result.error(); } scan_task.scan_task->is_first_schedule = false; } else { split_runner = scan_task.scan_task->split_runner.lock(); if (split_runner == nullptr) { return Status::OK(); } RETURN_IF_ERROR(_task_executor->re_enqueue_split( scan_task.scanner_context->task_handle(), false, split_runner)); } scan_task.scan_task->split_runner = split_runner; return Status::OK(); } else { return Status::InternalError<false>("scanner pool {} is shutdown.", _sched_name); } } ```
Merged
16 tasks
morningman
pushed a commit
that referenced
this pull request
Nov 15, 2025
…lt value to true. (#58017) ### What problem does this PR solve? Related PR: #55935, #57833 Problem Summary: ### Release note Because the time task scheduler timeout issue, in #55935, we set `enable_task_executor_in_internal_table` conf's default value to true. in #57833, we fix it for some cases. So in this PR, set `enable_task_executor_in_internal_table` conf's default value to true.
github-actions bot
pushed a commit
that referenced
this pull request
Nov 15, 2025
…lt value to true. (#58017) ### What problem does this PR solve? Related PR: #55935, #57833 Problem Summary: ### Release note Because the time task scheduler timeout issue, in #55935, we set `enable_task_executor_in_internal_table` conf's default value to true. in #57833, we fix it for some cases. So in this PR, set `enable_task_executor_in_internal_table` conf's default value to true.
nagisa-kunhah
pushed a commit
to nagisa-kunhah/doris
that referenced
this pull request
Dec 14, 2025
… exceeded concurrency limit case. (apache#57833) ### What problem does this PR solve? Problem Summary: ### Release note Fix time-sharing task executor don't re-schedule when exceeded concurrency limit case. The time-sharing task executor needs the state of `ScanTask` to track split scheduling and determine whether to schedule it as the first time by `enqueue_splits` or reschedule it by `re_enqueue_split`. ``` virtual Status submit_scan_task(SimplifiedScanTask scan_task) override { if (!_is_stop) { std::cout << "submitting scan task to task executor scheduler, context id: " << scan_task.scanner_context->ctx_id << std::endl; std::shared_ptr<SplitRunner> split_runner; if (scan_task.scan_task->is_first_schedule) { split_runner = std::make_shared<ScannerSplitRunner>("scanner_split_runner", scan_task.scan_func); RETURN_IF_ERROR(split_runner->init()); auto result = _task_executor->enqueue_splits( scan_task.scanner_context->task_handle(), false, {split_runner}); if (!result.has_value()) { LOG(WARNING) << "enqueue_splits failed: " << result.error(); return result.error(); } scan_task.scan_task->is_first_schedule = false; } else { split_runner = scan_task.scan_task->split_runner.lock(); if (split_runner == nullptr) { return Status::OK(); } RETURN_IF_ERROR(_task_executor->re_enqueue_split( scan_task.scanner_context->task_handle(), false, split_runner)); } scan_task.scan_task->split_runner = split_runner; return Status::OK(); } else { return Status::InternalError<false>("scanner pool {} is shutdown.", _sched_name); } } ```
nagisa-kunhah
pushed a commit
to nagisa-kunhah/doris
that referenced
this pull request
Dec 14, 2025
…lt value to true. (apache#58017) ### What problem does this PR solve? Related PR: apache#55935, apache#57833 Problem Summary: ### Release note Because the time task scheduler timeout issue, in apache#55935, we set `enable_task_executor_in_internal_table` conf's default value to true. in apache#57833, we fix it for some cases. So in this PR, set `enable_task_executor_in_internal_table` conf's default value to true.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Problem Summary:
Release note
Fix time-sharing task executor don't re-schedule when exceeded concurrency limit case. The time-sharing task executor needs the state of
ScanTaskto track split scheduling and determine whether to schedule it as the first time byenqueue_splitsor reschedule it byre_enqueue_split.Check List (For Author)
Test
tpcds1000 q88
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)