cmccabe commented on a change in pull request #10366: URL: https://github.com/apache/kafka/pull/10366#discussion_r606373590
########## File path: metadata/src/main/java/org/apache/kafka/controller/QuorumController.java ########## @@ -301,6 +328,89 @@ private void appendControlEvent(String name, Runnable handler) { queue.append(event); } + private static final String GENERATE_SNAPSHOT = "generateSnapshot"; + + private static final int MAX_BATCHES_PER_GENERATE_CALL = 10; + + class SnapshotGeneratorManager implements Runnable { + private final Function<Long, SnapshotWriter> writerBuilder; + private final ExponentialBackoff exponentialBackoff = + new ExponentialBackoff(10, 2, 5000, 0); + private SnapshotGenerator generator = null; + + SnapshotGeneratorManager(Function<Long, SnapshotWriter> writerBuilder) { + this.writerBuilder = writerBuilder; + } + + void createSnapshotGenerator(long epoch) { Review comment: It's not technically necessary since we have other checks, but I will add a check. In general this situation should not occur. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org