chia7712 commented on a change in pull request #10868:
URL: https://github.com/apache/kafka/pull/10868#discussion_r663183197



##########
File path: core/src/main/scala/kafka/server/ControllerApis.scala
##########
@@ -74,7 +75,15 @@ class ControllerApis(val requestChannel: RequestChannel,
 
   val authHelper = new AuthHelper(authorizer)
   val requestHelper = new RequestHandlerHelper(requestChannel, quotas, time)
-  private val aclApis = new AclApis(authHelper, authorizer, requestHelper, 
"controller", config)
+  private[server] val aclApis = new AclApis(authHelper, authorizer, 
requestHelper, "controller", config)
+  private val _isClosed = new AtomicBoolean(false)
+
+  def isClosed: Boolean = _isClosed.get()
+
+  def close(): Unit = if (_isClosed.compareAndSet(false, true)) {

Review comment:
       make sure it gets closed only once. I'm fine to remove it if it is 
overkill :)




-- 
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: jira-unsubscr...@kafka.apache.org

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


Reply via email to