Repository navigation
Say where a Search Native exchange failed before its response - #167
Merged
Merged
Conversation
net/http calls WroteRequest even when the write fails, so a connection dropped mid-upload read as waiting for the response head. Advance only on a successful write, drop the connect and handshake-done hooks that a losing parallel dial can report out of order, name a failure while reading the head, and treat a broken pipe as closed.
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.
In production, a few Search Natives at a time end with UNAVAILABLE "Native HTTP exchange incomplete" while OpenSearch reports no errors and the pooled record path never fails. Every Native opens its own connection, so connection setup (2s connect and TLS handshake budgets) is the main suspect, but the failure drops the underlying error and cannot tell a handshake timeout from a reset or a server that closed the connection.
The failure now names the phase the exchange reached (connecting, TLS handshake, sending, waiting for the response head) and, when known, whether the connection was refused, reset, closed or timed out. The words come from a fixed vocabulary and never quote the error, which carries the backend URL. Behaviour, completions and failure codes are unchanged.