KarboniteKream commented on code in PR #13777:
URL: https://github.com/apache/kafka/pull/13777#discussion_r1209671539


##########
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:
   I wonder, would using `SnapshotRegistry.LATEST_EPOCH` make more sense 
semantically? We're also specifically checking for that value in 
`TimelineObject.get()`.



-- 
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

Reply via email to