When running DumpLogSegments against an .index file, mismatches may be reported when the indexed message offset is not the first record in a batch. For example:
And looking at the corresponding .log file:
In this case, the last offset in the batch was indexed instead of the first, but the index has to map physical position to the start of the batch, leading to the mismatch.
It seems like DumpLogSegments should not report these cases as mismatches, which users might interpret as an error or problem