Repository navigation
fix(java): keep a queued sign-in from failing as replaced - #4652
Merged
Merged
Conversation
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.
mmodzelewski
approved these changes
Oct 26, 2026
Codecov Report❌ Patch coverage is
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
🚀 New features to boost your workflow:
|
krishvishal
approved these changes
Oct 27, 2026
spetz
approved these changes
Oct 27, 2026
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.
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.