Provide more context to failing RPCs from the connection pool #1292
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.
Motivation:
When an RPC is started using the connection pool, it waits for a
connection to come up and a stream to be created. It may also time out
waiting for the connection to come up, this may be because the pool is
genuinely too busy to handle the RPC or there is an underlying problem
with the connection.
In the latter case it's not possible for the RPC to see the underlying
reason that it timed out. This makes issue diagnosis more difficult than
necessary when there root cause is at the connection level (e.g. due to TLS
configuration) as important but infrequent connection-level errors are
lost in the noise of RPC-level timeouts.
Modifications:
recent connection-level error to occur on a connection managed by the
pool. The error is cleared as soon as any connection within the pool
becomes available. This error is added to existing waiter errors to
provide more context.
but which holds 'Error' as associated data in some cases.
ConnectionManagerto theConnectionPoolResult:
Connection level errors are more obvious.