Tolerate endpoints without a location when detecting the local DC - #693
Open
Myllyenko wants to merge 1 commit into
Open
Tolerate endpoints without a location when detecting the local DC#693Myllyenko wants to merge 1 commit into
Myllyenko wants to merge 1 commit into
Conversation
detectLocalDC grouped endpoints with Collectors.groupingBy on EndpointRecord::getLocation, which throws NullPointerException for a null key. The endpoint that a transport bootstraps with has no location: it is built by getDiscoveryEndpoint from the connection string. So YdbTransportImpl.start seeded the pool with that endpoint and blew up before reaching the "fewer than two datacenters" guard, making BalancingSettings.detectLocalDs unusable in fallback mode. Filter out endpoints with no location - they say nothing about datacenters - and treat a null endpoint list as "no local DC".
Myllyenko
force-pushed
the
fix/priority-picker-null-location
branch
from
August 6, 2026 08:49
d9ee791 to
3a8a21e
Compare
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #693 +/- ##
============================================
- Coverage 71.91% 71.87% -0.04%
- Complexity 3474 3475 +1
============================================
Files 390 390
Lines 16220 16221 +1
Branches 1698 1698
============================================
- Hits 11664 11659 -5
- Misses 3904 3910 +6
Partials 652 652 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
detectLocalDCgrouped endpoints withCollectors.groupingByonEndpointRecord::getLocation, which throwsNullPointerExceptionfor a null key. The endpoint that a transport bootstraps with has no location: it is built bygetDiscoveryEndpointfrom the connection string. SoYdbTransportImpl.startseeded the pool with that endpoint and blew up before reaching the "fewer than two datacenters" guard, makingBalancingSettings.detectLocalDsunusable in fallback mode.