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/04 04:31:34 UTC

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

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


##########
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:
   > I don't suggest we change signature of method for the might extension in the future
   
   @gaozhangmin 
   I don't see any necessary to keep this, at least in the near future. Let's make the code cleaner.



-- 
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