Skip to content

fix(java): keep a queued sign-in from failing as replaced - #4652

Merged
hubcio merged 2 commits into
masterfrom
fix/java-sign-in-close-race
Oct 27, 2026
Merged

hubcio merged 2 commits into
masterfrom
fix/java-sign-in-close-race

Conversation

@hubcio

@hubcio hubcio commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

A sign-in that started while another one was in flight could fail
with "A new sign-in replaced this one", although nothing replaced
it, which made shouldNotSignInAsThePreviousUserAfterARejectedSignIn
flaky in CI. Off the event loop, discardAuthentication only queues
the close of the abandoned channel. Netty reads ready sockets
before queued tasks, so the old Register's reply could end that
sign-in and send the queued Register on that channel before the
close ran.

A Register started on the loop now acquires its channel in a new
loop task, which runs after the queued close, as an acquire from
another thread already does.

A sign-in that started while another one was in flight could fail
with "A new sign-in replaced this one", although nothing replaced
it, which made shouldNotSignInAsThePreviousUserAfterARejectedSignIn
flaky in CI. Off the event loop, discardAuthentication only queues
the close of the abandoned channel. Netty reads ready sockets
before queued tasks, so the old Register's reply could end that
sign-in and send the queued Register on that channel before the
close ran.

A Register started on the loop now acquires its channel in a new
loop task, which runs after the queued close, as an acquire from
another thread already does.
@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Oct 26, 2026
@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.76%. Comparing base (dc4006d) to head (2d41d25).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ache/iggy/client/async/tcp/AsyncTcpConnection.java 66.66% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4652      +/-   ##
============================================
+ Coverage     80.89%   90.76%   +9.86%     
- Complexity     3104     3111       +7     
============================================
  Files          1465     1460       -5     
  Lines        356188   348093    -8095     
  Branches     300421   292315    -8106     
============================================
+ Hits         288155   315957   +27802     
+ Misses        61202    25509   -35693     
+ Partials       6831     6627     -204     
Components Coverage Δ
Rust Core 92.08% <ø> (+11.92%) ⬆️
Java SDK 78.21% <66.66%> (+0.01%) ⬆️
C# SDK 83.74% <ø> (+0.04%) ⬆️
Python SDK 85.69% <ø> (+0.01%) ⬆️
PHP SDK 90.67% <ø> (ø)
Node SDK 96.44% <ø> (-0.01%) ⬇️
Go SDK 69.97% <ø> (+0.12%) ⬆️
C++ SDK 85.51% <ø> (ø)
Files with missing lines Coverage Δ
...ache/iggy/client/async/tcp/AsyncTcpConnection.java 82.80% <66.66%> (-0.05%) ⬇️

... and 497 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hubcio
hubcio merged commit 6e9ca2e into master Oct 27, 2026
40 checks passed
@hubcio
hubcio deleted the fix/java-sign-in-close-race branch October 27, 2026 07:36
@github-actions github-actions Bot removed the S-waiting-on-review PR is waiting on a reviewer label Oct 27, 2026
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.

4 participants