Skip to content

Conversation

@guoquanwei
Copy link
Contributor

This submission can solve the channel blocking problem during service discovery, as well as the channel message missing problem when the GRPC idle state changes. 

The first scenario is when both the configuration center and registration center are initialized at the same time during service startup, and the SubscribeCallback method will be triggered twice, throwing the error "over time discovering the creation of observers", resulting in a discovery failure. The second scenario occurs after NotLoadCacheAtStart: true. When grpc exits the idle state, calling newWatcher again will not trigger the SubscribeCallback method, causing the Next function to be blocked and the service to be unable to communicate.

…xt methods.

This submission can solve the channel blocking problem during service discovery, as well as the channel message missing problem when the GRPC idle state changes.

The first scenario is when both the configuration center and registration center are initialized at the same time during service startup, and the SubscribeCallback method will be triggered twice, throwing the error "over time discovering the creation of observers", resulting in a discovery failure. The second scenario occurs after NotLoadCacheAtStart: true. When grpc exits the idle state, calling newWatcher again will not trigger the SubscribeCallback method, causing the Next function to be blocked and the service to be unable to communicate.
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 10, 2024
@dosubot dosubot bot added the LGTM label May 10, 2024
@shenqidebaozi shenqidebaozi merged commit fbac5fa into go-kratos:main May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LGTM size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants