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

Allow connecting with DcInferringLoadBalancingPolicy instead of localdatacenter #49

Conversation

kornilova203
Copy link
Contributor

@kornilova203 kornilova203 commented Dec 15, 2023

How to reproduce

Try connecting without specifying localdatacenter but with specifying DcInferringLoadBalancingPolicy which should discover localdatacenter automatically jdbc:cassandra://localhost:9046/?loadBalancing=DcInferringLoadBalancingPolicy

Expected result

Successful connection

Actual result

Confusing error No node was available to execute the query

Problem

localdatacenter is set to an empty string

Solution

Do not set localdatacenter if it was not specified.
If user set loadBalancing then connection will be successful.
If user didn't set loadBalancing then at least they'll see the correct error message Since you provided explicit contact points, the local DC must be explicitly set

@kornilova203 kornilova203 force-pushed the DataGrip/fix-connecting-with-no-localdatacenter branch from 68fda6b to c08f0d2 Compare December 15, 2023 17:12
Copy link
Collaborator

@maximevw maximevw left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your contribution @kornilova203! 😃
I let you review my comment, then I'll be able to validate your pull request.

@kornilova203
Copy link
Contributor Author

Sure, no problem

@maximevw maximevw merged commit 96f7e64 into ing-bank:release/next Dec 15, 2023
1 check passed
@kornilova203 kornilova203 deleted the DataGrip/fix-connecting-with-no-localdatacenter branch May 9, 2024 16:11
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.

None yet

2 participants