jsancio commented on a change in pull request #10705: URL: https://github.com/apache/kafka/pull/10705#discussion_r635529881
########## 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: Done. Added snapshot loading at startup and added back the test for it. There is some code duplication in the tests that I'll remove as part of https://issues.apache.org/jira/browse/KAFKA-12787 -- 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