-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support preferable location for connections #121
Support preferable location for connections #121
Conversation
@@ -117,6 +118,10 @@ private static GrpcTransportBuilder makeGrpcTransportBuilder(@NonNull YdbConfig | |||
throw new IllegalArgumentException("one of [discoveryEndpoint, hostAndPort] must be set"); | |||
} | |||
|
|||
if (config.getPreferableLocation() != null) { | |||
transportBuilder.withBalancingSettings(BalancingSettings.fromLocation(config.getPreferableLocation())); |
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 see that YDB Java SDK has more BalancingSettings
than we add in this PR.
At the very least, it also has the "detect data center automatically" setting BalancingSettings.detectLocalDs()
(with Ds instead of Dc in the name, which seems like a misspelling).
There also is the (presumably, default) BalancingSettings.defaultInstance()
that means "use all nodes for client balancing".
Let's maybe add a dedicated BalancingConfig
structure to YdbConfig
to reflect these options?
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.
Sounds reasonable. I revised the PR
264d712
to
f207450
Compare
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.
Please fix Checkstyle failures (use Organize Imports in IDEA):
https://github.com/ydb-platform/yoj-project/actions/runs/13174055945/job/36786287533?pr=121
It looks like there are unused imports in |
@a1kaigorodov Yes, please fix the unused imports in YqlOrderBy in this PR 🤗 |
f207450
to
36ee8bc
Compare
Done |
@nvamelichev Can you please let me know when the next release is scheduled? |
We'll probably make a release early this week. Note that the release will also include:
Please indicate if you need a release of the older 2.5.x with this PR cherry-picked, or if you've already migrated to 2.6.x. |
We still use the older version. It would be great if you could backport this pull request for 2.5. |
This PR is now in release 2.6.6 (already in Maven Central). |
✅ Also fixed in backport release 2.5.13 (already on Maven Central). |
No description provided.