public void finishSnapshot() {
        for (Integer brokerId : image.brokers().keySet()) {
            if (!changedBrokers.containsKey(brokerId)) {
                changedBrokers.put(brokerId, Optional.empty());
            }
        }
        for (Integer controllerId : image.controllers().keySet()) {
            if (!changedControllers.containsKey(controllerId)) {
                changedControllers.put(controllerId, Optional.empty());
            }
        }
    }
Represents changes to the cluster in the metadata image.
metadata/src/main/java/org/apache/kafka/image/ClusterDelta.java