private FileChannel openChannel() throws IOException {
        FileChannel channel = FileChannel.open(file.toPath(), StandardOpenOption.CREATE,
                StandardOpenOption.READ, StandardOpenOption.WRITE);
        maybeChannel = Optional.of(channel);
        channel.position(channel.size());
        return channel;
    }
Do a basic sanity check on this index to detect obvious problems.

@throws CorruptIndexException if any problems are found.
storage/src/main/java/org/apache/kafka/storage/internals/log/TransactionIndex.java