private TimestampOffset lastEntryFromIndexFile() {
        if (entries() == 0) {
            return new TimestampOffset(RecordBatch.NO_TIMESTAMP, baseOffset());
        } else {
            return entry(entries() - 1);
        }
    }
In the case of unclean shutdown, the last entry needs to be recovered from the time index.
core/src/main/scala/kafka/log/streamaspect/ElasticTimeIndex.java