private void appendBatches(List<CompletedBatch<T>> batches) {
        try {
            for (CompletedBatch<T> batch : batches) {
                snapshot.append(batch.data);
            }
        } finally {
            batches.forEach(CompletedBatch::release);
        }
    }
Adds a {@link SnapshotFooterRecord} to the snapshot

No more records should be appended to the snapshot after calling this method
raft/src/main/java/org/apache/kafka/snapshot/RecordsSnapshotWriter.java