You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by pe...@apache.org on 2020/10/20 04:40:16 UTC
[pulsar] branch master updated: Close ZK connections at end of
metadata setup (#8228)
This is an automated email from the ASF dual-hosted git repository.
penghui 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 8ddd6ba Close ZK connections at end of metadata setup (#8228)
8ddd6ba is described below
commit 8ddd6bae1f7f2e81c0f77a2fe3a76709cd87aa29
Author: Bryce M <59...@users.noreply.github.com>
AuthorDate: Mon Oct 19 22:39:52 2020 -0600
Close ZK connections at end of metadata setup (#8228)
### Modifications
When deploying Pulsar in Kubernetes, the zookeeper-metadata job does not reach completed status with ZooKeeper TLS enabled. These changes close the ZooKeeper connections before exiting therefore the Kubernetes job is marked as completed.
---
.../src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java
index 0fc27b1..ad01528 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java
@@ -239,6 +239,9 @@ public class PulsarClusterMetadataSetup {
// Create transaction coordinator assign partitioned topic
createPartitionedTopic(configStoreZk, TopicName.TRANSACTION_COORDINATOR_ASSIGN, arguments.numTransactionCoordinators);
+ localZk.close();
+ configStoreZk.close();
+
log.info("Cluster metadata for '{}' setup correctly", arguments.cluster);
}