oneby-wang commented on PR #25910: URL: https://github.com/apache/pulsar/pull/25910#issuecomment-4591143676
@lhotari I noticed that after receiving a ZooKeeper `Expired` event, `PulsarZooKeeperClient` creates a new ZooKeeper instance while continuing to use the same `watcherManager`. With the current direct forwarding approach, events from the new ZooKeeper instance are delayed until the new handle is published. However, if the old expired client still has any queued or late events delivered to the same `watcherManager`, those stale events could still affect the session state and potentially make the state transitions inconsistent. Do you think we should add a lightweight generation fencing mechanism here, so that only events from the currently active ZooKeeper instance are forwarded/processed, and stale events from previous instances are ignored? -- 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]
