This is an automated email from the ASF dual-hosted git repository.

technoboy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 0903f45b9cf [fix][broker] Pass metadataStoreSessionTimeoutMillis to 
bookkeeper client configuration to properly configure ZK timeout (#24624)
0903f45b9cf is described below

commit 0903f45b9cfd97816545f8210d8e6b7dab9cdd39
Author: Zhangao <[email protected]>
AuthorDate: Mon Sep 1 16:11:49 2025 +0800

    [fix][broker] Pass metadataStoreSessionTimeoutMillis to bookkeeper client 
configuration to properly configure ZK timeout (#24624)
---
 conf/bookkeeper.conf                                                 | 5 ++++-
 conf/broker.conf                                                     | 5 +++++
 .../java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java   | 1 +
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/conf/bookkeeper.conf b/conf/bookkeeper.conf
index 4058d787e2c..8503694cb7c 100644
--- a/conf/bookkeeper.conf
+++ b/conf/bookkeeper.conf
@@ -661,10 +661,13 @@ diskCheckInterval=10000
 # Examples:
 #  - metadataServiceUri=zk+hierarchical://my-zk-1:2181/ledgers
 #  - metadataServiceUri=etcd+hierarchical:http://my-etcd:2379
-#  - metadataServiceUri=metadata-store:zk:my-zk-1:2281
+#  - metadataServiceUri=metadata-store:zk:my-zk-1:2281/ledgers
+#  - metadataServiceUri=metadata-store:oxia://oxia-server:6648/bookkeeper
 # If you use metadata-store configuration, you need to configure following 
items in JVM option:
 # 
-Dbookkeeper.metadata.client.drivers=org.apache.pulsar.metadata.bookkeeper.PulsarMetadataClientDriver
 # 
-Dbookkeeper.metadata.bookie.drivers=org.apache.pulsar.metadata.bookkeeper.PulsarMetadataBookieDriver
+# These are JVM options are set by default when BookKeeper components or tools 
are started with bin/pulsar or
+# bin/bookkeeper scripts included in the the Pulsar distribution
 metadataServiceUri=
 
 # @Deprecated - `ledgerManagerFactoryClass` is deprecated in favor of using 
`metadataServiceUri`
diff --git a/conf/broker.conf b/conf/broker.conf
index 11270ae081e..c5c9c05ca39 100644
--- a/conf/broker.conf
+++ b/conf/broker.conf
@@ -1031,6 +1031,11 @@ maxConcurrentHttpRequests=1024
 # For example: zk+hierarchical://localhost:2181/ledgers
 # The metadata service uri list can also be semicolon separated values like 
below:
 # zk+hierarchical://zk1:2181;zk2:2181;zk3:2181/ledgers
+# For using Pulsar's default Metadata Client Driver for BookKeeper, the URI 
starts with "metadata-store:".
+# Examples:
+# - metadata-store:zk:zk1:2181,zk2:2181,zk3:2181/ledgers
+# - metadata-store:oxia://oxia-server:6648/bookkeeper
+# When the value is empty, the broker will default to using broker's 
metadataStoreUrl config appended with "/ledgers"
 bookkeeperMetadataServiceUri=
 
 # Authentication plugin to use when connecting to bookies
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java
index 45299d9ed05..90615eebb3c 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java
@@ -126,6 +126,7 @@ public class BookKeeperClientFactoryImpl implements 
BookKeeperClientFactory {
         bkConf.setBusyWaitEnabled(conf.isEnableBusyWait());
         bkConf.setNumWorkerThreads(conf.getBookkeeperClientNumWorkerThreads());
         bkConf.setThrottleValue(conf.getBookkeeperClientThrottleValue());
+        bkConf.setZkTimeout((int) conf.getMetadataStoreSessionTimeoutMillis());
         bkConf.setAddEntryTimeout((int) 
conf.getBookkeeperClientTimeoutInSeconds());
         bkConf.setReadEntryTimeout((int) 
conf.getBookkeeperClientTimeoutInSeconds());
         
bkConf.setSpeculativeReadTimeout(conf.getBookkeeperClientSpeculativeReadTimeoutInMillis());

Reply via email to