You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "lhotari (via GitHub)" <gi...@apache.org> on 2025/08/27 08:25:36 UTC

[I] [Bug] ZKSessionWatcher will trigger a ConnectionLost session event if query takes more than 1/15 of zk session time, causing flushing of all caches [pulsar]

lhotari opened a new issue, #24674:
URL: https://github.com/apache/pulsar/issues/24674

   @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.
   
   _Originally posted by @lhotari in https://github.com/apache/pulsar/issues/24624#issuecomment-3227265882_
               


-- 
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-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] ZKSessionWatcher will trigger a ConnectionLost session event if query takes more than 1/15 of zk session time, causing flushing of all caches [pulsar]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on issue #24674:
URL: https://github.com/apache/pulsar/issues/24674#issuecomment-3227278372

   @merlimat any suggestions about how to solve this issue?


-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org