Add progress bar support for fault tolerant execution#12275
Add progress bar support for fault tolerant execution#12275linzebing wants to merge 1 commit intotrinodb:masterfrom
Conversation
|
cc @electrum |
client/trino-client/src/main/java/io/trino/client/StatementStats.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
how does it impact progress bar rendering for non-fault tolerant execution? Does it impact anything else than progress bar rendering?
There was a problem hiding this comment.
I checked all text occurrences of isScheduled, seems it's only used in progress bar rendering
There was a problem hiding this comment.
I would recommend to refrain from changing the isScheduled semantics. If it's only used for progress bar rendering can we implement a check that we need there? (or maybe add a separate boolean filed, isAnyStageScheduled)?
There was a problem hiding this comment.
I would argue that anyMatch is the right semantics here. As long as any of the stage is scheduled, then the whole query should be seen as scheduled, right?
There was a problem hiding this comment.
For a single stage the SCHEDULED status indicates that all splits have been scheduled. That's why I'm a little worried that it might be not intuitive for isScheduled to return true as soon as only a single stage has all it's split scheduled.
There was a problem hiding this comment.
Then for fault tolerant execution, it's not scheduled until the last stage executes, which doesn't make sense. Plus, isScheduled is only used in progress bar, so if we add a isAnyStageScheduled, then will leave isScheduled effectively useless (and therefore should be removed).
There was a problem hiding this comment.
Do you think we can simply rename it?
e33b1e4 to
339f9b7
Compare
|
CI: #12298 |
client/trino-client/src/main/java/io/trino/client/StatementStats.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
I would recommend to refrain from changing the isScheduled semantics. If it's only used for progress bar rendering can we implement a check that we need there? (or maybe add a separate boolean filed, isAnyStageScheduled)?
339f9b7 to
dde9a8c
Compare
|
Closing as this is low-pri and I don't plan to work on it |
Unlike pipelined execution, fault tolerant execution doesn't execute stages all at once. This means in the middle of execution, some stages will be in PLANNED state, which is seen as not scheduled. Therefore, we don't know the number of total splits upfront for fault tolerant execution.
The way we deal with this is, we calculate the percentages of each stage (if it's not scheduled, percentage is 0), and average them as the progress of fault tolerant execution.
Description
Improvement
Client library
This adds progress bar support for queries executing in fault-tolerant mode.
Related issues, pull requests, and links
Documentation
(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
(x) No release notes entries required.
( ) Release notes entries required with the following suggested text: