Skip to content
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

Add remote Host info to PageTransportErrorException #4511

Merged
merged 1 commit into from
Jul 24, 2020

Conversation

sanchitkashyap
Copy link
Member

@sanchitkashyap sanchitkashyap commented Jul 21, 2020

This would be useful to identify REMOTE_HOST_GONE for PTEE. For more info look -> prestodb/presto#7691

@cla-bot cla-bot bot added the cla-signed label Jul 21, 2020
@sanchitkashyap sanchitkashyap requested a review from electrum July 21, 2020 08:20
long token = getToken(response);
long nextToken = getNextToken(response);
boolean complete = getComplete(response);
String taskInstanceId = getTaskInstanceId(response, uri);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to pass uri to all those methods? We are catching PageTransportErrorException below anyway and add remote host information there. IMO that should be eough.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't do it that way, as that would require creating another constructor of PageTransportErrorException and pass remoteHost as null to its parent. I thought we would not want to do this (pass remoteHost as null for transport exceptions). I will change it if that is okay.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... Having remoteHost nullable is kinda ugly. So maybe we can live with this extra parameter passed to those helper methods. @electrum ?

@sanchitkashyap Can you also comment on motivation for the change? The only final PTEE which is sent back to user is constructed in the catch clause below.
And we already have whole uri as part of an exception message there. Is that not enough?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@losipiuk i have updated the description to explain the motivation.


import static io.prestosql.spi.StandardErrorCode.PAGE_TRANSPORT_ERROR;

public class PageTransportErrorException
extends PrestoException
extends PrestoTransportException
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the change here seems not related to Add remote Host info to PageTransportErrorException

is it intentional?
make this into a separate commit

also cc @electrum

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed and related since PrestoTransportException is the base class that contains the remote host, which is extracted in Failures to include as part of the error info. Given that PageTransportTimeoutException already extends it (and is the only subclass), I'm guessing we intended to do it for PageTransportErrorException originally.

@losipiuk
Copy link
Member

LGTM. I will let @electrum chime in to comment about making PageTransportErrorException a PrestoTransportException now.

@electrum electrum merged commit 063a747 into trinodb:master Jul 24, 2020
@electrum
Copy link
Member

Thanks!

@electrum electrum mentioned this pull request Aug 7, 2020
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants