public void replay(BeginTransactionRecord message, long offset) {
        if (currentSnapshotId != null) {
            throw new RuntimeException("BeginTransactionRecord cannot appear within a snapshot.");
        }
        if (transactionStartOffset != -1L) {
            throw new RuntimeException("Can't replay a BeginTransactionRecord at " + offset +
                " because the transaction at " + transactionStartOffset + " was never closed.");
        }
        snapshotRegistry.getOrCreateSnapshot(offset - 1);
        transactionStartOffset = offset;
        log.info("Replayed {} at offset {}.", message, offset);
    }
Called after we have finished loading a Raft snapshot.

@param timestamp The timestamp of the snapshot.
metadata/src/main/java/org/apache/kafka/controller/OffsetControlManager.java