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



##########
File path: core/src/main/scala/kafka/log/AbstractIndex.scala
##########
@@ -311,9 +311,11 @@ abstract class AbstractIndex(@volatile private var _file: 
File, val baseOffset:
   }
 
   protected def safeForceUnmap(): Unit = {
-    try forceUnmap()
-    catch {
-      case t: Throwable => error(s"Error unmapping index $file", t)
+    if (mmap != null) {

Review comment:
       #7387 added null check to ```forceUnmap``` rather than 
```safeForceUnmap```. Which one makes sense? For another, ```forceUnmap``` is 
used by ```safeForceUnmap``` only. We can merge them so above question gets 
resolved.




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