Skip to content

Commit

Permalink
remove duplicated configuration (#11283)
Browse files Browse the repository at this point in the history
### 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
  • Loading branch information
aloyszhang committed Jul 14, 2021
1 parent d6928c2 commit 481feea
Showing 1 changed file with 0 additions and 1 deletion.
Expand Up @@ -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());
Expand Down

0 comments on commit 481feea

Please sign in to comment.