[fix][broker] Pass metadataStoreSessionTimeoutMillis to bookkeeper client configuration to properly configure ZK timeout - #24624
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #24624 +/- ##
============================================
+ Coverage 74.23% 74.32% +0.09%
+ Complexity 33179 33177 -2
============================================
Files 1881 1881
Lines 146850 146851 +1
Branches 16866 16866
============================================
+ Hits 109019 109153 +134
+ Misses 29191 29027 -164
- Partials 8640 8671 +31
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…tion in broker.conf and bookkeeper.conf
lhotari
left a comment
There was a problem hiding this comment.
LGTM. The zk timeout setting would only matter when bookkeeperMetadataServiceUri is set.
|
@gaozhangmin During a test related PR #24171 I noticed this about the same code location:
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: I'll file a new issue about resolving this problem. |
|
Issue about ZKSessionWatcher is #24674 |
…ient configuration to properly configure ZK timeout (apache#24624)
…ient configuration to properly configure ZK timeout (apache#24624)
Motivation
I found there is problem related to bk's zktimeout config, the default bk zktimeout of bk is 10s, but
We caculate tickTimeMillis = zktimeout/15.
pulsar/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKSessionWatcher.java
Line 63 in 277835a
In below future.get, always timeout.
pulsar/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKSessionWatcher.java
Lines 108 to 112 in 277835a
We should support set bk zktimeut by
bkConf.setZkTimeout((int) conf.getMetadataStoreSessionTimeoutMillis());
Log
Modifications
bkConf.setZkTimeout((int) conf.getMetadataStoreSessionTimeoutMillis());
Verifying this change
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-complete