Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Channel exiting idle mode remains IDLE, not CONNECTING, until LB pick updated #10517

Closed
ejona86 opened this issue Aug 24, 2023 · 0 comments · Fixed by #11028
Closed

Channel exiting idle mode remains IDLE, not CONNECTING, until LB pick updated #10517

ejona86 opened this issue Aug 24, 2023 · 0 comments · Fixed by #11028
Labels
Milestone

Comments

@ejona86
Copy link
Member

ejona86 commented Aug 24, 2023

This is because ManagedChannelImpl's exitIdleMode() does not call channelStateManager.gotoState(CONNECTING);. When exiting idle mode, the next state transition is in LbHelperImpl.updateBalancingState(), which is after the NR has returned its initial results.

This generally doesn't matter much because RPCs behave similarly for IDLE and CONNECTING. But it would be confusing when using the getState() API, like the user at https://stackoverflow.com/questions/76950718/after-the-channel-is-created-it-takes-1000ms-to-transition-from-idel-state-to .

@ejona86 ejona86 added the bug label Aug 24, 2023
@ejona86 ejona86 added this to the Next milestone Aug 24, 2023
@YifeiZhuang YifeiZhuang self-assigned this Aug 24, 2023
kannanjgithub added a commit to kannanjgithub/grpc-java that referenced this issue Mar 21, 2024
ejona86 pushed a commit that referenced this issue Mar 27, 2024
The name resolver takes some time before it returns addresses. While waiting the channel will be IDLE instead of the proper CONNECTING. This generally doesn't matter since RPCs behave similarly for IDLE and CONNECTING, but is confusing for users when watching channel.getState() closely.

Fixes #10517.
@ejona86 ejona86 modified the milestones: Next, 1.64 Mar 27, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants