@ijuma Thanks for fixing this. LGTM.

`AbstractIndex.closeHandler` was added in the JBOD KIP-112. In case a disk is 
considered faulty due to IOException, we can not call `close()` because 
`close()` does IO operation on the disk. In order to unmount the fault disk 
without shutting down the broker, we need to unmap the reference to all files 
on the disk by calling `closeHandler()`. Given the motivation of adding 
`closeHandler()`, we can see that its motivation is separate from the usage of 
`close()`, which means that we do not need to change the implementation of 
`close()` assuming our Kafka server implementation is already working well in 
the non-JBOD mode. This is why we didn't do this previously.

If I understand it right, it is still safe (with current Kafka implementation) 
not to close handler in close(). But it is more elegant and intuitive to call 
`closeHandler()` in `close()`.

[ Full content available at: https://github.com/apache/kafka/pull/5757 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to