FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(pick_first): ignore state updates from shut down or replaced subchannels by AgraVator · Pull Request #12968 · grpc/grpc-java · GitHub

/ grpc-java Public

fix(pick_first): ignore state updates from shut down or replaced subchannels - #12968

Draft
AgraVator wants to merge 1 commit into
grpc:masterfrom
AgraVator:fix-pickfirst-stale-subchannel
Draft

fix(pick_first): ignore state updates from shut down or replaced subchannels#12968
AgraVator wants to merge 1 commit into
grpc:masterfrom
AgraVator:fix-pickfirst-stale-subchannel

Conversation

Copy link
Copy Markdown
Contributor

In legacy PickFirstLoadBalancer, when handleNameResolutionError() or shutdown() is called, subchannel.shutdown() is invoked. Because ManagedChannelImpl delays subchannel shutdown by 5 seconds (SUBCHANNEL_SHUTDOWN_DELAY_SECONDS), the old subchannel may complete a connection attempt during this window and fire READY state updates. Without a check verifying if the calling subchannel is still the current active subchannel, PickFirstLoadBalancer publishes a READY picker for the obsolete subchannel right before its 5-second delayed shutdown task fires and kills the transport. This leaves the channel permanently stuck in READY with a dead subchannel picker.

Fixes #12958

…hannels

In legacy PickFirstLoadBalancer, when handleNameResolutionError() or shutdown() is called, subchannel.shutdown() is invoked.
Because ManagedChannelImpl delays subchannel shutdown by 5 seconds (SUBCHANNEL_SHUTDOWN_DELAY_SECONDS), the old subchannel may complete a connection attempt during this window and fire READY state updates.
Without a check verifying if the calling subchannel is still the current active subchannel, PickFirstLoadBalancer publishes a READY picker for the obsolete subchannel right before its 5-second delayed shutdown task fires and kills the transport. This leaves the channel permanently stuck in READY with a dead subchannel picker.

Fixes grpc#12958

kannanjgithub left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Rather than say 'Fixes #12958' in the PR description, say 'Partially addresses #12958'. Lets keep the issue open to still look into the new PF problem mentioned in the issue also.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants


Back | FazBrowse Home | New Git URL