private int batchHeaderSizeInBytes() {
        return AbstractRecords.recordBatchHeaderSizeInBytes(
            RecordBatch.MAGIC_VALUE_V2,
            compression.type()
        );
    }
Get a list of the records appended to the batch.
@return a list of records
raft/src/main/java/org/apache/kafka/raft/internals/BatchBuilder.java