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



##########
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:
       To clarify, we do use `forceUnmap` directly in a test. It's difficult to 
test methods that swallow all exceptions and hence it's useful to have 
`forceUnmap` from that perspective.




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