Commit fc29b74
authored
fix: Do not block scheduler if there are stages ready for scheduling (#26268)
## Description
Do not block query scheduler when there is a stage ready to be
scheduled.
## Motivation and Context
Consider a query with two stages, Stage 1 and Stage 2.
Before this change when one for the stages is blocked the scheduler will
block and wait for it to unblock preventing the second stage from
scheduling.
## Impact
Reduced scheduling delays in certain cases
## Test Plan
Tested with a simple INSERT INTO query with scaled writers enabled.
ScaledWriters scheduler has a fixed 200ms delay. Delay in ScaledWriter
scheduler was causing slow split scheduling for TableScan stage.
## Contributor checklist
- [x] Please make sure your submission complies with our [contributing
guide](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md),
in particular [code
style](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#code-style)
and [commit
standards](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#commit-standards).
- [x] PR description addresses the issue accurately and concisely. If
the change is non-trivial, a GitHub Issue is referenced.
- [x] Documented new properties (with its default value), SQL syntax,
functions, or other functionality.
- [x] If release notes are required, they follow the [release notes
guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines).
- [x] Adequate tests were added if applicable.
- [x] CI passed.
## Release Notes
Please follow [release notes
guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines)
and fill in the release notes below.
```
== NO RELEASE NOTE ==
```1 parent 7adbad9 commit fc29b74
File tree
1 file changed
+16
-6
lines changed- presto-main-base/src/main/java/com/facebook/presto/execution/scheduler
1 file changed
+16
-6
lines changedLines changed: 16 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
423 | 424 | | |
424 | 425 | | |
425 | 426 | | |
| 427 | + | |
426 | 428 | | |
427 | 429 | | |
428 | 430 | | |
| |||
445 | 447 | | |
446 | 448 | | |
447 | 449 | | |
448 | | - | |
449 | | - | |
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
| 454 | + | |
454 | 455 | | |
455 | 456 | | |
456 | 457 | | |
457 | 458 | | |
458 | 459 | | |
459 | 460 | | |
460 | 461 | | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
461 | 468 | | |
462 | 469 | | |
463 | 470 | | |
| |||
475 | 482 | | |
476 | 483 | | |
477 | 484 | | |
478 | | - | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
479 | 489 | | |
480 | 490 | | |
481 | 491 | | |
| |||
535 | 545 | | |
536 | 546 | | |
537 | 547 | | |
538 | | - | |
| 548 | + | |
539 | 549 | | |
540 | | - | |
| 550 | + | |
541 | 551 | | |
542 | | - | |
| 552 | + | |
543 | 553 | | |
544 | 554 | | |
545 | 555 | | |
| |||
0 commit comments