cmccabe commented on code in PR #12050:
URL: https://github.com/apache/kafka/pull/12050#discussion_r875064356


##########
server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java:
##########
@@ -233,6 +250,19 @@ public String version() {
         return ibpVersion;
     }
 
+    public boolean didMetadataChange() {
+        return didMetadataChange;
+    }
+
+    Optional<MetadataVersion> previous() {
+        int idx = this.ordinal();
+        if (idx > 1) {
+            return Optional.of(VERSIONS[idx - 2]);

Review Comment:
   Why is this `idx - 2` rather than `idx - 1`?



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