Skip to content

Fixing nanosecond/millisecond mix-up in transport discovery - #689

Open
Myllyenko wants to merge 1 commit into
ydb-platform:masterfrom
Myllyenko:fix/discovery-wait-ready-time-units
Open

Fixing nanosecond/millisecond mix-up in transport discovery#689
Myllyenko wants to merge 1 commit into
ydb-platform:masterfrom
Myllyenko:fix/discovery-wait-ready-time-units

Conversation

@Myllyenko

Copy link
Copy Markdown

YdbTransportImpl.getChannel computed the time left until the request deadline in nanoseconds (deadlineAfter is a System.nanoTime() value) and passed it to YdbDiscovery.waitReady(long millis), which awaits on a Condition with MILLISECONDS. A 5 second deadline therefore became a wait of roughly 57 days, so any request issued before the endpoint pool was populated blocked indefinitely instead of failing at its own deadline.

YdbTransportImpl.getChannel computed the time left until the request
deadline in nanoseconds (deadlineAfter is a System.nanoTime() value) and
passed it to YdbDiscovery.waitReady(long millis), which awaits on a
Condition with MILLISECONDS. A 5 second deadline therefore became a wait
of roughly 57 days, so any request issued before the endpoint pool was
populated blocked indefinitely instead of failing at its own deadline.
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 71.96%. Comparing base (d876581) to head (4c92222).

Files with missing lines Patch % Lines
...main/java/tech/ydb/core/impl/YdbTransportImpl.java 75.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (75.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     #689      +/-   ##
============================================
+ Coverage     71.91%   71.96%   +0.05%     
- Complexity     3474     3478       +4     
============================================
  Files           390      390              
  Lines         16220    16221       +1     
  Branches       1698     1698              
============================================
+ Hits          11664    11674      +10     
+ Misses         3904     3898       -6     
+ Partials        652      649       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant