Zhengcy05 commented on issue #16186: URL: https://github.com/apache/dubbo/issues/16186#issuecomment-4628813667
Hi👋, Thanks for the detailed analysis. Here are my thoughts: # Root Cause I believe the root cause is still in the connection handling logic of `Curator5ZookeeperClient`: in the `check=false` scenario with multiple registries, if `blockUntilConnected()` fails and the unconnected client is not closed as expected, the subsequent workflow will continue to treat this unavailable connection as a valid one. As a result, `AbstractZookeeperClient#createPersistent` / `createEphemeral` will keep trying to create nodes, repeatedly fail, and eventually prolong the startup time or even cause the application startup to fail. # Plan - First, fix the failure-handling logic in `Curator5ZookeeperClient` to ensure that an unconnected client will not be reused by later workflows; - At the same time, add null-safe handling to `ListenerRegistryWrapper` to avoid `NullPointerException` when `registry == null`; - I will also add the corresponding regression tests to cover the key paths: `check=false`, multiple ZooKeeper registries, and `registry == null`. I’m not sure whether my understanding is correct, but if this approach looks good, please assign this issue to me. I’m willing to follow up and submit a PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
