private void finalizeSnapshotWithFooter() {
        SnapshotFooterRecord footerRecord = new SnapshotFooterRecord()
            .setVersion(ControlRecordUtils.SNAPSHOT_FOOTER_CURRENT_VERSION);
        accumulator.appendSnapshotFooterRecord(footerRecord, time.milliseconds());
        accumulator.forceDrain();
    }
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