-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fix race conditions in updating RemoteTaskStats #11044
Conversation
@raunaqmorarka is this related to #11039 ? |
@findepi I don't think this will resolve the |
core/trino-main/src/main/java/io/trino/server/remotetask/ContinuousTaskStatusFetcher.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/server/remotetask/DynamicFiltersFetcher.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/server/remotetask/ContinuousTaskStatusFetcher.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/server/remotetask/TaskInfoFetcher.java
Outdated
Show resolved
Hide resolved
In the existing implementation, the shared currentRequestStartNanos object may be updated by the next request after the current request future is done but before the callback handler has read the value of currentRequestStartNanos set before the current request was started.
cc64ea6
to
acf0fe1
Compare
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.
From what I understand ContinuousTaskStatusFetcher
wasn't susceptible to this issue as a new request is always scheduled from a callback, but DynamicFiltersFetcher
and TaskInfoFetcher
were
Merged, thanks! |
Description
In the existing implementation, the shared currentRequestStartNanos object
may be updated by the next request after the current request future is done
but before the callback handler has read the value of currentRequestStartNanos
set before the current request was started.
General information
Fix
Core query engine
Fixes potential inaccuracies in recording of RemoteTaskStats
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: