dengziming commented on code in PR #13777: URL: https://github.com/apache/kafka/pull/13777#discussion_r1211294473
########## core/src/test/scala/integration/kafka/server/KRaftClusterTest.scala: ########## @@ -96,6 +96,32 @@ class KRaftClusterTest { } } + @Test + def testCreateClusterAndRestartControllerNode(): Unit = { Review Comment: @soarez Yes, we shutdown the active controller, then restart it to make it send `ApiVersionRequest` to a standby controller. ########## metadata/src/main/java/org/apache/kafka/controller/QuorumController.java: ########## @@ -2028,8 +2028,11 @@ public CompletableFuture<FinalizedControllerFeatures> finalizedFeatures( if (lastCommittedOffset == -1) { return CompletableFuture.completedFuture(new FinalizedControllerFeatures(Collections.emptyMap(), -1)); } + // It's possible for a standby controller to receiving ApiVersionRequest and we do not have any timeline snapshot + // in a standby controller, in this case we use Long.MAX_VALUE. + long epoch = isActive() ? lastCommittedOffset : Long.MAX_VALUE; Review Comment: good suggestion. -- 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. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org