You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[A76] Clarify behaviors discovered during implementation
I discovered a few behaviors that I'm not sure are desired (although I don't
think they are harmful either), and that may cause confusion for implementors,
so definitely worth noting:
1. If multiple concurrent RPCs use the same picker, and the picker has no
endpoint in connecting state, then both may trigger a connection attempt,
resulting in multiple endpoints leaving Idle. This happens until the picker
is updated to update `picker_has_endpoint_in_connecting_state`. One thing we
could do to avoid this, at least in Go, is to atomically set
`picker_has_endpoint_in_connecting_state` to true when we trigger a
connection attempt.
2. If we queued the pick because there was no endpoint in `Ready` state and
there was endpoints in `Idle` or connecting state, then when the endpoint
transitions to Ready, we may end up triggering a connection attempt again on
the next pick for a given RPC.
3. The behavior is not specified when multiple endpoints have the same hash key.
Looking at Envoy's code, I think there is no deliberate choice of endpoint in
that case, so we could leave it unspecified, but I think it's worth
clarifying.
0 commit comments