Skip to content

Fix/background identity interrupt - #697

Open
alex268 wants to merge 2 commits into
ydb-platform:masterfrom
alex268:fix/background-identity-interrupt
Open

Fix/background identity interrupt#697
alex268 wants to merge 2 commits into
ydb-platform:masterfrom
alex268:fix/background-identity-interrupt

Conversation

@alex268

@alex268 alex268 commented Aug 12, 2026

Copy link
Copy Markdown
Member

No description provided.

Igor Melnichenko and others added 2 commits August 5, 2026 21:30
BackgroundIdentity.unwrap returned null after an InterruptedException.
SyncLogin.validate feeds that value straight into updateState, which
CAS-ed the shared state reference to null and then threw a
NullPointerException from next.init(). The reference stayed null, so
every following getToken() call - on any thread - failed with a
NullPointerException and authentication for the whole transport was
permanently dead after a single interrupt.

Throw instead of returning null, keeping the interrupt flag set. The
state stays in SyncLogin, so the next getToken() re-checks the same login
future and recovers on its own. updateState now also rejects a null state
explicitly, so a future regression fails loudly at the call site.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@robot-vibe-db robot-vibe-db Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AI Review Summary

Verdict: ✅ No critical issues found

Critical issues

No critical issues found.

Other findings

  • Minor | Low: StaticCredentials.tryLogin() replaces try-with-resources with manual transport.close() in a whenComplete callback, losing the safety net if a synchronous exception occurs between rpc.createTransport() and callback registration — core/src/main/java/tech/ydb/core/auth/StaticCredentials.java:120

This review was generated automatically. Critical issues require attention; other findings are advisory.
If this comment was useful, please give it a 👍 — it helps us improve the review bot.

Comment thread core/src/main/java/tech/ydb/core/auth/StaticCredentials.java
@robot-vibe-db

robot-vibe-db Bot commented Aug 12, 2026

Copy link
Copy Markdown

Full analysis log

Analysis performed by claude, claude-opus-4-6.

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.00%. Comparing base (d876581) to head (dceaf8c).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #697      +/-   ##
============================================
+ Coverage     71.91%   72.00%   +0.09%     
- Complexity     3474     3493      +19     
============================================
  Files           390      391       +1     
  Lines         16220    16277      +57     
  Branches       1698     1706       +8     
============================================
+ Hits          11664    11720      +56     
  Misses         3904     3904              
- Partials        652      653       +1     

☔ 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant