You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/01 14:31:57 UTC

[GitHub] [pulsar] Pomelongan commented on a diff in pull request #17378: [improve][broker] remove unnecessary parameters(reusefuture) and related logic

Pomelongan commented on code in PR #17378:
URL: https://github.com/apache/pulsar/pull/17378#discussion_r960730516


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java:
##########
@@ -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;

Review Comment:
   IMHO:
   The parameter reusefuture was added for a function in the PR #6478, but it was later removed in the PR #9485, so it is reasonable to restore the parameter to its original state.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org