showuon commented on code in PR #14953:
URL: https://github.com/apache/kafka/pull/14953#discussion_r1418658110
##########
metadata/src/main/java/org/apache/kafka/metadata/authorizer/StandardAuthorizer.java:
##########
@@ -93,8 +93,10 @@ public CompletableFuture<Void> initialLoadFuture() {
@Override
public void completeInitialLoad(Exception e) {
- data.log.error("Failed to complete initial ACL load process.", e);
- initialLoadFuture.completeExceptionally(e);
+ if (!initialLoadFuture.isDone()) {
+ data.log.error("Failed to complete initial ACL load process.", e);
+ initialLoadFuture.completeExceptionally(e);
Review Comment:
`completeExceptionally` will check if the future is done, if yes, then
no-op. Making it more readable to move into if block.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]