From 481feeadd4ba45ce02e5ef5b5af4c3fbfbceae55 Mon Sep 17 00:00:00 2001 From: Aloys Date: Wed, 14 Jul 2021 14:49:20 +0800 Subject: [PATCH] remove duplicated configuration (#11283) ### Motivation Remove duplicated configuration when `createBkClientConfiguration` Currently, the configuration for BookKeeper client's `NumWorkerThreads` was duplicated in https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java?#L115 and https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java?#L126 So `NumWorkerThreads` is set to 1 finally which is not expected. ### Modifications remove the duplicated hardcode for `setNumWorkerThreads` to make `NumWorkerThreads` configurable --- .../org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java | 1 - 1 file changed, 1 deletion(-) 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 67a12a7f402f8..a59ee6525235a 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 @@ -123,7 +123,6 @@ ClientConfiguration createBkClientConfiguration(ServiceConfiguration conf) { bkConf.setStickyReadsEnabled(conf.isBookkeeperEnableStickyReads()); bkConf.setNettyMaxFrameSizeBytes(conf.getMaxMessageSize() + Commands.MESSAGE_SIZE_FRAME_PADDING); bkConf.setDiskWeightBasedPlacementEnabled(conf.isBookkeeperDiskWeightBasedPlacementEnabled()); - bkConf.setNumWorkerThreads(1); if (StringUtils.isNotBlank(conf.getBookkeeperMetadataServiceUri())) { bkConf.setMetadataServiceUri(conf.getBookkeeperMetadataServiceUri());