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 2020/12/10 14:59:36 UTC

[GitHub] [kafka] chia7712 commented on a change in pull request #9680: MINOR: a small refactor for LogManage#shutdown

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



##########
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:
       Oh, my bad. Will revert it with suitable test.




----------------------------------------------------------------
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:
users@infra.apache.org