From 6fe37a373fcdaab0fae57f12b08f25157d37cf16 Mon Sep 17 00:00:00 2001 From: Lari Hotari Date: Fri, 7 Mar 2025 19:24:03 +0200 Subject: [PATCH] Use bookkeeperMetadataServiceUri in broker and make PulsarMetadataClientDriver configurable (#589) --- charts/pulsar/templates/broker-configmap.yaml | 7 +++---- charts/pulsar/values.yaml | 9 ++++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/charts/pulsar/templates/broker-configmap.yaml b/charts/pulsar/templates/broker-configmap.yaml index 13f4438..49c96ef 100644 --- a/charts/pulsar/templates/broker-configmap.yaml +++ b/charts/pulsar/templates/broker-configmap.yaml @@ -37,11 +37,10 @@ data: {{- $configMetadataStoreUrl = printf "zk:%s%s" (include "pulsar.zookeeper.connect" .) .Values.metadataPrefix }} {{- end }} configurationMetadataStoreUrl: "{{ $configMetadataStoreUrl }}" - # setting bookkeeperMetadataServiceUri causes a NPE in WorkerUtils.initializeDlogNamespace which is a bug in Pulsar - # omit setting bookkeeperMetadataServiceUri until the bug is fixed when functions are enabled. - # bookkeeperMetadataServiceUri will default to configurationMetadataStoreUrl + "/ledgers" in that case - {{- if not .Values.components.functions }} + {{- if .Values.pulsar_metadata.bookkeeper.usePulsarMetadataClientDriver }} bookkeeperMetadataServiceUri: "metadata-store:{{ $configMetadataStoreUrl }}/ledgers" + {{- else }} + bookkeeperMetadataServiceUri: "zk+hierarchical://{{ template "pulsar.zookeeper.connect" . }}{{ .Values.metadataPrefix }}/ledgers" {{- end }} {{- end }} {{- if .Values.components.oxia }} diff --git a/charts/pulsar/values.yaml b/charts/pulsar/values.yaml index dcd13ad..f1da3ce 100755 --- a/charts/pulsar/values.yaml +++ b/charts/pulsar/values.yaml @@ -912,8 +912,15 @@ pulsar_metadata: ## Maximum size of a batch (in KB) metadataStoreBatchingMaxSizeKb: 128 - ## BookKeeper metadata configuration settings with Pulsar Helm Chart deployments + ## BookKeeper client and BookKeeper metadata configuration settings with Pulsar Helm Chart deployments bookkeeper: + ## Controls whether to use the PIP-45 metadata driver (PulsarMetadataClientDriver) for BookKeeper client + ## in the Pulsar Broker when using ZooKeeper as a metadata store. + ## This is setting applies to Pulsar Broker's BookKeeper client. + ## When set to true, Pulsar Broker's BookKeeper client will use the PIP-45 metadata driver (PulsarMetadataBookieDriver). + ## When set to false, Pulsar Broker's BookKeeper client will use BookKeeper's default ZooKeeper connection implementation. + usePulsarMetadataClientDriver: false + ## Controls whether to use the PIP-45 metadata driver (PulsarMetadataBookieDriver) for BookKeeper components ## when using ZooKeeper as a metadata store. ## This is a global setting that applies to all BookKeeper components.