Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AnonHxy committed Jun 12, 2023
1 parent 5fb293d commit 9d35e80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1198,8 +1198,8 @@ The delayed message index time step(in seconds) in per bucket snapshot segment,
private int numWorkerThreadsForNonPersistentTopic = -1;
@FieldContext(
category = CATEGORY_SERVER,
doc = "Number of worker threads to serve persistent topic")
private int numWorkerThreadsForPersistentTopic = Runtime.getRuntime().availableProcessors();
doc = "Number of worker threads to serve topic ordered executor")
private int numWorkersTopicOrderedExecutor = 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 getNumWorkerThreadsForPersistentTopic() {
public int getNumWorkersTopicOrderedExecutor() {
return numWorkerThreadsForNonPersistentTopic > 0
? numWorkerThreadsForNonPersistentTopic : numWorkerThreadsForPersistentTopic;
? numWorkerThreadsForNonPersistentTopic : numWorkersTopicOrderedExecutor;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ public BrokerService(PulsarService pulsar, EventLoopGroup eventLoopGroup) throws
PersistentOfflineTopicStats>newBuilder().build();

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

0 comments on commit 9d35e80

Please sign in to comment.