You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/07/02 18:19:16 UTC

[GitHub] [kafka] ijuma commented on a change in pull request #10868: MINOR: make sure alterAclsPurgatory is closed when controller server …

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



##########
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:
       Why do we need the compare and set here and the other class?




-- 
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-unsubscribe@kafka.apache.org

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