That is a good point. I dug into the codes and found that we use the setter of `file` only when we rename the file (e.g. alter log dir, add suffix). In this case, only the metadata (i.e. inode) changes and the physical location of the file stays the same so I think the state like `_length` and `_map` are the same and we don't need to reinitialize them after the switch.
[ Full content available at: https://github.com/apache/kafka/pull/5498 ] This message was relayed via gitbox.apache.org for [email protected]
