-
Notifications
You must be signed in to change notification settings - Fork 25.4k
ESQL: Fix Driver status iterations and cpuTime #123290
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
Conversation
Hi @ivancea, I've created a changelog YAML for you. |
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Hi @ivancea, I've updated the changelog YAML for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
currentIteration++; | ||
unreportedIterations++; | ||
|
||
long now = nowSupplier.getAsLong(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional: you could extract an elapsed
time, since all the checks use that as 1st updateStatus()
param.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One branch doesn't use that calculation, and it may be unused if no if
is executed. So I would keep it that way, probably
int currentIteration = 0; | ||
// The iterations to be reported on the next status update. | ||
int unreportedIterations = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional: you could call them totalIterations
(and currentIterations
, respectively).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just made the variable names more explicit 👀
# Conflicts: # x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/operator/DriverTests.java
💔 Backport failed
You can use sqren/backport to manually backport by running |
Fixes elastic#122967 When the Driver reported status, if the "report at least every X time" report was triggered, it was re-adding the same iterations and cpuTime again, as it wasn't clearing it before the next iteration. Now, there are separated variables for the last updated iterations and reported time.
Fixes elastic#122967 When the Driver reported status, if the "report at least every X time" report was triggered, it was re-adding the same iterations and cpuTime again, as it wasn't clearing it before the next iteration. Now, there are separated variables for the last updated iterations and reported time.
Fixes #122967 When the Driver reported status, if the "report at least every X time" report was triggered, it was re-adding the same iterations and cpuTime again, as it wasn't clearing it before the next iteration. Now, there are separated variables for the last updated iterations and reported time.
Fixes #122967 When the Driver reported status, if the "report at least every X time" report was triggered, it was re-adding the same iterations and cpuTime again, as it wasn't clearing it before the next iteration. Now, there are separated variables for the last updated iterations and reported time.
Without elastic#123290 we're not going to get accurate status reports. They are indicative, but not accurate. Closes elastic#126808
Fixes #122967
When the Driver reported status, if the "report at least every X time" report was triggered, it was re-adding the same iterations and cpuTime again, as it wasn't clearing it before the next iteration.
Now, there are separated variables for the last updated iterations and reported time.