Block on a full reactor command queue instead of failing - #1175
Open
Will Portnoy (willportnoy) wants to merge 1 commit into
Open
Block on a full reactor command queue instead of failing#1175Will Portnoy (willportnoy) wants to merge 1 commit into
Will Portnoy (willportnoy) wants to merge 1 commit into
Conversation
ReactorClient::request and connect used try_send, so a transiently full command queue surfaced as BrokerError::ResourceExhausted (and, for connect, PeerUnchanged) — which reaches a guest as ENOBUFS on an otherwise valid socket operation. A full queue is internal backpressure, not a resource limit the guest should see, and Linux has no "broker momentarily busy" errno; a valid operation must complete. Switch both to a blocking send (the caller already waits for the reactor's acknowledgement, so this is the same order of blocking). The only remaining send failure is a gone reactor, mapped to Internal / PeerIndeterminate as before. The other reactor client methods (close_socket, Stop) already block on send, so this makes request/connect consistent with them; they run under strictly fewer held locks, so no new lock is held across the blocking send. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ea6a6c0d-6bb9-4eed-b8f6-5059a53e326d
|
🤖 SemverChecks 🤖 No breaking API changes detected Note: this does not mean API is unchanged, or even that there are no breaking changes; simply, none of the detections triggered. |
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.
ReactorClient::request and connect used try_send, so a transiently full command queue surfaced as ResourceExhausted (ENOBUFS to the guest) on an otherwise valid socket operation. A full queue is internal backpressure, not a resource limit the guest should see, and Linux has no broker-momentarily-busy errno. Both now block on send, consistent with the other reactor client methods (close_socket, Stop) that already do; the only remaining send failure is a gone reactor, mapped to Internal / PeerIndeterminate as before. The caller already waits for the reactor's acknowledgement, and these paths run under strictly fewer held locks than the pre-existing blocking sends, so no new lock is held across the blocking send.