Repository navigation
fix(gateways): survive Kafka accept errors and a late Iggy at startup - #4645
Merged
Merged
Conversation
An accept error or an Iggy that was not up yet stopped the gateway, and SASL checks kept sessions that filled the clients table.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4645 +/- ##
============================================
- Coverage 90.85% 89.75% -1.11%
+ Complexity 3104 2989 -115
============================================
Files 1479 1477 -2
Lines 361309 368047 +6738
Branches 305179 312629 +7450
============================================
+ Hits 328277 330342 +2065
- Misses 26124 30771 +4647
- Partials 6908 6934 +26
🚀 New features to boost your workflow:
|
numinnex
approved these changes
Oct 28, 2026
mmodzelewski
approved these changes
Oct 28, 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.
Rationale
Three short-lived conditions stopped the Kafka gateway or locked Iggy clients out.
The accept loop retried EINTR, ECONNABORTED, EWOULDBLOCK, EMFILE and ENFILE only. Any other
accept()error ended the listener, and the gateway process exited with it. Linuxaccept(2)also returns the network errors of one pending connection, such as EPROTO, ENETDOWN or EHOSTUNREACH, and its manual says to retry them. ENOBUFS and ENOMEM, a short lack of kernel memory, also stopped the gateway.At startup, the gateway connected to Iggy once. One connect gives up within 15 s, so a gateway that started before its Iggy node exited. As a sidecar, the gateway starts at the same time as its Iggy node.
Each SASL login opens a short-lived Iggy client to check the password. The gateway shut that client down without a logout. Iggy kept each such session in its clients table until its lease ran out, 36 s by default. A full table refuses every new login, so a burst of Kafka logins locked the other clients of the cluster out.