ijuma commented on code in PR #18329:
URL: https://github.com/apache/kafka/pull/18329#discussion_r1898947965


##########
core/src/main/scala/kafka/network/SocketServer.scala:
##########
@@ -232,16 +199,14 @@ class SocketServer(
     }
 
     info("Enabling request processing.")
-    controlPlaneAcceptorOpt.foreach(chainAcceptorFuture)
     dataPlaneAcceptors.values().forEach(chainAcceptorFuture)
     
FutureUtils.chainFuture(CompletableFuture.allOf(authorizerFutures.values.toArray:
 _*),
         allAuthorizerFuturesComplete)
 
     // Construct a future that will be completed when all Acceptors have been 
successfully started.
     // Alternately, if any of them fail to start, this future will be 
completed exceptionally.
-    val allAcceptors = dataPlaneAcceptors.values().asScala.toSeq ++ 
controlPlaneAcceptorOpt
     val enableFuture = new CompletableFuture[Void]
-    
FutureUtils.chainFuture(CompletableFuture.allOf(allAcceptors.map(_.startedFuture).toArray:
 _*), enableFuture)
+    
FutureUtils.chainFuture(CompletableFuture.allOf(dataPlaneAcceptors.values().asScala.toSeq.map(_.startedFuture).toArray:
 _*), enableFuture)

Review Comment:
   Can't you avoid one of the `toSeq` by doing `toArray` immediately?



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