@Override
            public boolean hasNext() {
                try {
                    return channel.position() - position.value >= AbortedTxn.TOTAL_SIZE;
                } catch (IOException e) {
                    throw new KafkaException("Failed read position from the transaction index " + file.getAbsolutePath(), e);
                }
            }
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