Skip to content

grpc-js: Make pick_first use exitIdle#2619

Merged
murgatroid99 merged 1 commit intogrpc:@grpc/grpc-js@1.9.xfrom
murgatroid99:grpc-js_idle_loop_fix
Nov 16, 2023
Merged

grpc-js: Make pick_first use exitIdle#2619
murgatroid99 merged 1 commit intogrpc:@grpc/grpc-js@1.9.xfrom
murgatroid99:grpc-js_idle_loop_fix

Conversation

@murgatroid99
Copy link
Copy Markdown
Member

This fixes the bug described in #1490 (comment). #2609 was introduced to prevent a busy loop when pick_first is in TRANSIENT_FAILURE, and the resolver always returns the result immediately. However, making the resolver only return once caused pick_first to never update after going from READY to IDLE when a connection drops. This fixes that by making exitIdle use the most recent address list. This will result in some wasted work if the address list is stale, but if exitIdle is called there should also be a resolver update pending, so it will be eventually consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants