tombentley commented on a change in pull request #9676:
URL: https://github.com/apache/kafka/pull/9676#discussion_r545144134



##########
File path: core/src/main/scala/kafka/log/Log.scala
##########
@@ -1556,6 +1572,8 @@ class Log(@volatile private var _dir: File,
           done = fetchDataInfo != null || segmentEntry == null
         }
 
+        checkForLogDirFailure()

Review comment:
       Yeah, I wondered about putting it in `maybeHandleIOException` too, and 
I've made this change. There are a few places where changing the order in which 
we do `maybeHandleIOException` with respect to `lock synchronized` would seem 
to avoid some possible races with no side effects other than increasing the 
duration the lock is held (for the `try` and the volatile read). I'm thinking 
specifically `maybeIncrementLogStartOffset`, `roll`, `delete`, 
`truncateFullyAndStartAt` and perhaps even `truncateTo`. But given that there 
will always exist some races maybe it's not worth it, WDYT?




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