showuon opened a new pull request, #14953:
URL: https://github.com/apache/kafka/pull/14953

   Currently, when initializing StandardAuthorizer, it'll wait until all ACL 
loaded and complete the `initialLoadFuture`. So, checking logs, we'll see:
   ```
   2023-12-06 14:07:50,325 INFO [StandardAuthorizer 1] Initialized with 6 
acl(s). (org.apache.kafka.metadata.authorizer.StandardAuthorizerData) 
[kafka-1-metadata-loader-event-handler]
   2023-12-06 14:07:50,325 INFO [StandardAuthorizer 1] Completed initial ACL 
load process. (org.apache.kafka.metadata.authorizer.StandardAuthorizerData) 
[kafka-1-metadata-loader-event-handler]
   ```
   
   But then, when shutting down the node, we will also see this error:
   ```
   2023-12-06 14:12:32,752 ERROR [StandardAuthorizer 1] Failed to complete 
initial ACL load process. 
(org.apache.kafka.metadata.authorizer.StandardAuthorizerData) 
[kafka-1-metadata-loader-event-handler]
   java.util.concurrent.TimeoutException
        at kafka.server.metadata.AclPublisher.close(AclPublisher.scala:98)
        at 
org.apache.kafka.image.loader.MetadataLoader.closePublisher(MetadataLoader.java:568)
        at 
org.apache.kafka.image.loader.MetadataLoader.lambda$removeAndClosePublisher$7(MetadataLoader.java:528)
        at 
org.apache.kafka.queue.KafkaEventQueue$EventContext.run(KafkaEventQueue.java:127)
        at 
org.apache.kafka.queue.KafkaEventQueue$EventHandler.handleEvents(KafkaEventQueue.java:210)
        at 
org.apache.kafka.queue.KafkaEventQueue$EventHandler.run(KafkaEventQueue.java:181)
        at java.base/java.lang.Thread.run(Thread.java:840)
   ```
   
   It's confusing. And it's because we'll try to complete authorizer 
initialLoad, and complete the `initialLoadFuture` if not done. But we'll log 
the error no matter it's completed or not. This patch improves the logging.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


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

Reply via email to