private void startNewBatch() {
        ByteBuffer buffer = memoryPool.tryAllocate(maxBatchSize);
        if (buffer != null) {
            currentBatch = new BatchBuilder<>(
                buffer,
                serde,
                compression,
                nextOffset,
                time.milliseconds(),
                epoch,
                maxBatchSize
            );
        }
    }
Append a {@link SnapshotFooterRecord} record to the batch

@param snapshotFooterRecord The record to append
@param currentTimestamp The current time in milliseconds
@throws IllegalStateException on failure to allocate a buffer for the record
raft/src/main/java/org/apache/kafka/raft/internals/BatchAccumulator.java