lhotari commented on PR #24624: URL: https://github.com/apache/pulsar/pull/24624#issuecomment-3227265882
@gaozhangmin During a test related PR #24171 I noticed this about the same code location: https://github.com/apache/pulsar/blob/6e8c3496647df275071190aec9d29ecbcee55e80/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKSessionWatcher.java#L108-L115 > This will trigger a ConnectionLost session event. That's why a delay should be kept under 2000 ms. > Currently MockZooKeeper's session timeout is hard coded to 30000ms and the check interval is 1/15 of this, therefore 2000ms. > > When there's a test that blocks the ZooKeeper thread for more than 2000ms, it will result in a ConnectionLost event. > This PR makes the session timeout configurable and it's possible to increase the session timeout for tests where it's necessary to use a longer session timeout to avoid ConnectionLost session events. This applies likewise to production code. This is problematic since the effective timeout becomes 1/15 of the zk session timeout for Pulsar operations. Together with this change made in #23018 it will add significant load to ZooKeepers: https://github.com/apache/pulsar/blob/829df71901de726a11bb3c8ee934d14b67ee9694/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java#L513-L519 I'll file a new issue about resolving this problem. -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org