Jun Rao created KAFKA-4067:
------------------------------
Summary: improve the handling of IOException in log.close()
Key: KAFKA-4067
URL: https://issues.apache.org/jira/browse/KAFKA-4067
Project: Kafka
Issue Type: Improvement
Affects Versions: 0.10.0.1
Reporter: Jun Rao
While reviewing KIP-33, I noticed that there are a few places that we can
improve in closing a log.
1. In FileMessageSet.close(): We should probably call flush after trim since
the later could change the size of the file channel.
2. AbstractIndex.close(): We should call flush at the end.
3. In Log.close(), if we hit an IOException, currently we just log it and
proceed with a clean shutdown. However, an IOException could leave the log or
indexes (e.g., when calling flush()) in a corrupted state. So, we probably
should halt the jvm in this case to force log recovery on restart.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)