Skip to content

Commit

Permalink
topicOrderedExecutorThreadNum
Browse files Browse the repository at this point in the history
  • Loading branch information
AnonHxy committed Jun 12, 2023
1 parent 9d35e80 commit 61e22cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -1199,7 +1199,7 @@ The delayed message index time step(in seconds) in per bucket snapshot segment,
@FieldContext(
category = CATEGORY_SERVER,
doc = "Number of worker threads to serve topic ordered executor")
private int numWorkersTopicOrderedExecutor = Runtime.getRuntime().availableProcessors();
private int topicOrderedExecutorThreadNum = Runtime.getRuntime().availableProcessors();

@FieldContext(
category = CATEGORY_SERVER,
Expand Down Expand Up @@ -3481,8 +3481,8 @@ public long getManagedLedgerCacheEvictionIntervalMs() {
: Math.min(MAX_ML_CACHE_EVICTION_INTERVAL_MS, managedLedgerCacheEvictionIntervalMs);
}

public int getNumWorkersTopicOrderedExecutor() {
public int getTopicOrderedExecutorThreadNum() {
return numWorkerThreadsForNonPersistentTopic > 0
? numWorkerThreadsForNonPersistentTopic : numWorkersTopicOrderedExecutor;
? numWorkerThreadsForNonPersistentTopic : topicOrderedExecutorThreadNum;
}
}
Expand Up @@ -315,7 +315,7 @@ public BrokerService(PulsarService pulsar, EventLoopGroup eventLoopGroup) throws
PersistentOfflineTopicStats>newBuilder().build();

this.topicOrderedExecutor = OrderedExecutor.newBuilder()
.numThreads(pulsar.getConfiguration().getNumWorkersTopicOrderedExecutor())
.numThreads(pulsar.getConfiguration().getTopicOrderedExecutorThreadNum())
.name("broker-topic-workers").build();
final DefaultThreadFactory acceptorThreadFactory =
new ExecutorProvider.ExtendedThreadFactory("pulsar-acceptor");
Expand Down

0 comments on commit 61e22cb

Please sign in to comment.