-
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
Catch exception in sendUpdate #20202
Conversation
To prevent bug similar to #19997 |
622173c
to
a78bafc
Compare
sendUpdateUnsafe(); | ||
} | ||
catch (Throwable e) { | ||
fatalUnacknowledgedFailure(new TrinoException(GENERIC_INTERNAL_ERROR, "unexpected error calling sendUpdate()", e)); |
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.
no need for TrinoException imo
can be just e
try { | ||
sendUpdateUnsafe(); | ||
} | ||
catch (Throwable e) { |
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.
Can we actually do that holistically? Maybe catch specific section in sendUpdate
. It looks like sendUpdate
might be touching some state (e.g updateErrorTracker#acquireRequestPermit
)
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.
IDK what you mean by that
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.
I looked at sendUpdate
and it seems it's generally stateless.
I don't think the code after
trino/core/trino-main/src/main/java/io/trino/server/remotetask/HttpRemoteTask.java
Line 777 in 5e58110
checkState(currentRequest.getAndSet(future) == null, "There should be no previous request running"); |
core/trino-main/src/main/java/io/trino/server/remotetask/HttpRemoteTask.java
Outdated
Show resolved
Hide resolved
Catch exception in sendUpdate. Currently in case we get unexpected exception from that method query would fail as thread responsible for updating task state will terminate.
a78bafc
to
5730c02
Compare
Release notes
(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: