-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cleanup][broker] remove unnecessary parameters(reusefuture) and related logic #17378
[cleanup][broker] remove unnecessary parameters(reusefuture) and related logic #17378
Conversation
LGTM |
} | ||
return FutureUtil.waitForAll(futures); | ||
} | ||
|
||
private CompletableFuture<Void> tryCreatePartitionAsync(final int partition, CompletableFuture<Void> reuseFuture) { | ||
CompletableFuture<Void> result = reuseFuture == null ? new CompletableFuture<>() : reuseFuture; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't suggest we change signature of method for the might extension in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gaozhangmin
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
/pulsarbot run-failure-checks |
2d26c83
to
551bd3b
Compare
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-failure-checks |
Motivation
When the
org.apache.pulsar.broker.admin.AdminResource#tryCreatePartitionAsync
method is called, the value of reusefuture passed in is null, which is a bit redundant and can be directly removedModifications
The input parameter reusefuture and the judgment that the parameter is null are removed
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation
Check the box below or label this PR directly.
Need to update docs?
doc-not-needed