Jibing-Li commented on code in PR #12491:
URL: https://github.com/apache/doris/pull/12491#discussion_r966546585
##########
be/src/vec/exec/scan/scanner_scheduler.cpp:
##########
@@ -98,17 +98,15 @@ void ScannerScheduler::_schedule_scanners(ScannerContext*
ctx) {
}
std::list<VScanner*> this_run;
- bool res = ctx->get_next_batch_of_scanners(&this_run);
+ ctx->get_next_batch_of_scanners(&this_run);
if (this_run.empty()) {
- if (!res) {
- // This means we failed to choose scanners this time, and there
may be no other scanners running.
- // So we need to submit this ctx back to queue to be scheduled
next time.
- submit(ctx);
- } else {
- // No need to push back this ctx to reschedule
- // There will be running scanners to push it back.
- ctx->update_num_running(0, -1);
- }
+ // There will be 2 cases when this_run is empty:
+ // 1. The blocks queue reaches limit.
+ // The consumer will continue scheduling the ctx.
+ // 2. All scanners are running.
+ // There running scanner will schedule the ctx after they are
finished.
+ // So here we just return to stop scheduling ctx.
+ ctx->update_num_running(0, -1);
Review Comment:
How does the consumer reschedule the ctx without submit it back to the
pending queue?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]