10BC0 JAVA-2938: servererrors.OverloadedException message is misleading by chicobento · Pull Request #1547 · apache/cassandra-java-driver · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@chicobento
Copy link
Contributor

OverloadedException is misleading probably due to a copy&paste mistake.

Adding the original server message to the exception, as in 3.x series.

Original thread: https://groups.google.com/a/lists.datastax.com/g/java-driver-user/c/KNPE34iOBgI/m/fWv5zOxNAQAJ

@chicobento chicobento changed the title Fix OverloadedException message JAVA-2938: servererrors.OverloadedException message is misleading Apr 29, 2021
public OverloadedException(@NonNull Node coordinator) {
super(coordinator, String.format("%s is bootstrapping", coordinator), null, false);
public OverloadedException(@NonNull Node coordinator, @NonNull String message) {
super(coordinator, message, null, false);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we could do as in 3.x and augment the original message with the coordinator address:

Suggested change
super(coordinator, message, null, false);
super(coordinator, String.format("%s was overloaded: %s", coordinator, message), null, false);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree. Uploaded a new version of the commit, used "is" instead of "was" to be in-synch with the other error message (bootstraping). But let me know if you prefer was to be in synch with 3.x

Copy link
Contributor
@adutra adutra left a comment

Choose a reason for hiding this comment

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

@chicobento looking really good!

Do you mind adding an entry to the changelog as below:

4.11.2 (in progress)

- [bug] JAVA-2938: OverloadedException message is misleading

Also, we don't have tests covering the change. But I admit that the change is very small so I can live without a test for it.

@chicobento
Copy link
Contributor Author

@chicobento looking really good!

Do you mind adding an entry to the changelog as below:

4.11.2 (in progress)

- [bug] JAVA-2938: OverloadedException message is misleading

Also, we don't have tests covering the change. But I admit that the change is very small so I can live without a test for it.

Yup, I looked for TCs in that sense and I couldn't find any.
I just added the changelog change on the original commit

@chicobento chicobento requested a review from adutra April 30, 2021 14:58
Copy link
Contributor
@adutra adutra left a comment

Choose a reason for hiding this comment

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

LGTM. Muito obrigado @chicobento 👍

@adutra adutra added this to the 4.11.2 milestone Apr 30, 2021
@chicobento chicobento closed this May 1, 2021
@adutra adutra reopened this May 18, 2021
@adutra
Copy link
Contributor
adutra commented May 18, 2021

@chicobento I committed directly to 4.x with a few modifications to make the changes compatible with the existing API.

One last thing: could you please sign our CLA?

https://cla.datastax.com/

Thanks!

@adutra
Copy link
Contributor
adutra commented May 21, 2021

@chicobento sorry to insist: please sign our CLA, otherwise I will have to revert your change. Thanks!

https://cla.datastax.com/

@chicobento
Copy link
Contributor Author
chicobento commented May 21, 2021 via email

@adutra
Copy link
Contributor
adutra commented May 24, 2021

Thank you! Closing now. Boa sorte a até a próxima :-)

@adutra adutra closed this May 24, 2021
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.

2 participants

0