public void reset() throws IOException {
        truncate();
        resize(maxIndexSize);
    }
Remove all the entries from the index and resize the index to the max index size.
storage/src/main/java/org/apache/kafka/storage/internals/log/AbstractIndex.java