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



##########
File path: core/src/main/scala/kafka/log/LogManager.scala
##########
@@ -479,14 +479,14 @@ class LogManager(logDirs: Seq[File],
 
     try {
       for ((dir, dirJobs) <- jobs) {
-        val hasErrors = dirJobs.map { future =>
+        val hasErrors = dirJobs.exists  { future =>
           Try(future.get) match {
             case Success(_) => false
             case Failure(e) =>
               warn(s"There was an error in one of the threads during 
LogManager shutdown: ${e.getCause}")
               true
           }
-        }.contains(true)
+        }

Review comment:
       @chia7712 This changed behavior. Previously we would call `get` on every 
`Future` and now we don't. @kowshik @junrao Seems like we didn't add a test 
that verifies the recent fix in this area?




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

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


Reply via email to