cmccabe commented on a change in pull request #10705: URL: https://github.com/apache/kafka/pull/10705#discussion_r633918245
########## File path: metadata/src/main/java/org/apache/kafka/controller/QuorumController.java ########## @@ -936,21 +944,13 @@ private QuorumController(LogContext logContext, this.replicationControl = new ReplicationControlManager(snapshotRegistry, logContext, defaultReplicationFactor, defaultNumPartitions, configurationControl, clusterControl, controllerMetrics); - this.logManager = logManager; + this.raftClient = raftClient; this.metaLogListener = new QuorumMetaLogListener(); - this.curClaimEpoch = -1L; - this.lastCommittedOffset = snapshotReader.epoch(); + this.curClaimEpoch = -1; + this.lastCommittedOffset = -1L; this.writeOffset = -1L; - while (snapshotReader.hasNext()) { - List<ApiMessage> batch = snapshotReader.next(); - long index = 0; - for (ApiMessage message : batch) { - replay(message, snapshotReader.epoch(), index++); - } - } - snapshotRegistry.createSnapshot(lastCommittedOffset); Review comment: Hmm... I would rather not remove this code if possible. In another comment I suggested moving it to the snapshot load function that you also added. That would also allow the associated test to keep working. -- 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