Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

voidzcy
Copy link
Contributor

@voidzcy voidzcy commented Nov 10, 2020

Related issue: #5610

On Android, there is a race between making new RPCs and reconnecting after network comes back. If the former happens first, RPCs fail immediately. This is because resetConnectBackoff() does not update the picker before trying to reconnect and new RPCs are sent with the old picker, which fails RPCs immediately.


Note #7192 is open for enterIdle(). But that shouldn't affect the usage in AndroidChannelBuilder for reconnecting.

@voidzcy voidzcy merged commit b3429ec into grpc:master Nov 17, 2020
dfawley pushed a commit to dfawley/grpc-java that referenced this pull request Jan 15, 2021
On Android, there is a race between making new RPCs and reconnecting after network comes back. If the former happens first, RPCs fail immediately. This is because resetConnectBackoff() does not update the picker before trying to reconnect and new RPCs are sent with the old picker, which fails RPCs immediately.

In this change, we move to use enterIdle(), which updates the channel picker to cause new RPCs being buffered (while subchannels are in reconnecting), at the moment network recovers. Hopefully, this can avoid RPCs being dropped prematurely in network recovery.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants