Skip to content

Commit

Permalink
remove unnecessary parameters(reusefuture) and related logic
Browse files Browse the repository at this point in the history
  • Loading branch information
huangzegui committed Aug 31, 2022
1 parent d4beae7 commit 2d26c83
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,13 @@ protected CompletableFuture<Void> tryCreatePartitionsAsync(int numPartitions) {
}
List<CompletableFuture<Void>> futures = new ArrayList<>(numPartitions);
for (int i = 0; i < numPartitions; i++) {
futures.add(tryCreatePartitionAsync(i, null));
futures.add(tryCreatePartitionAsync(i));
}
return FutureUtil.waitForAll(futures);
}

private CompletableFuture<Void> tryCreatePartitionAsync(final int partition, CompletableFuture<Void> reuseFuture) {
CompletableFuture<Void> result = reuseFuture == null ? new CompletableFuture<>() : reuseFuture;
private CompletableFuture<Void> tryCreatePartitionAsync(final int partition) {
CompletableFuture<Void> result = new CompletableFuture<>();
getPulsarResources().getTopicResources().createPersistentTopicAsync(topicName.getPartition(partition))
.thenAccept(r -> {
if (log.isDebugEnabled()) {
Expand Down

0 comments on commit 2d26c83

Please sign in to comment.