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

Differentiate different types of Drift failures #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tdcmeehan
Copy link

It's sometimes useful to log the reason for a failure. By separating out the specific
failure reasons into different exceptions, clients can now inspect the underlying failure
reason. This may be useful for logging, or for publication of custom metrics.

It's sometimes useful to log the reason for a failure.  By separating out the specific
failure reasons into different exceptions, clients can now inspect the underlying failure
reason.  This may be useful for logging, or for publication of custom metrics.
Copy link

@aweisberg aweisberg left a comment

Choose a reason for hiding this comment

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

Just delete the unused class

}

RetriesFailedException retriesFailedException = new RetriesFailedException(

Choose a reason for hiding this comment

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

You can delete the class for this now?

Choose a reason for hiding this comment

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

RetriesFailedException has been renamed as DriftRetriesFailedException

int overloadedRejects,
Set<? extends Address> attemptedAddresses)
{
super(format("Max retry time (%s) exceeded", maxRetryTime), invocationAttempts, retryTime, failedConnections, overloadedRejects, attemptedAddresses);

Choose a reason for hiding this comment

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

These exception classes are structurally identical so maybe they could be one? These could be reason codes. Don't feel very strongly about it though.

Is there some other idiom you are following?

Copy link

@ajaygeorge ajaygeorge left a comment

Choose a reason for hiding this comment

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

LGTM overall. % comments from Ariel on using codes .

Copy link

@aweisberg aweisberg left a comment

Choose a reason for hiding this comment

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

I missed the rename.

@wanglinsong wanglinsong force-pushed the master branch 5 times, most recently from f6789f1 to ffd0e7f Compare May 24, 2024 00:19
@wanglinsong wanglinsong requested a review from a team as a code owner May 30, 2024 21:48
@wanglinsong wanglinsong requested a review from presto-oss May 30, 2024 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants