jsancio commented on code in PR #19416:
URL: https://github.com/apache/kafka/pull/19416#discussion_r2050845404


##########
raft/src/main/java/org/apache/kafka/raft/LeaderState.java:
##########
@@ -416,14 +476,192 @@ public void requestResign() {
         this.resignRequested = true;
     }
 
+    /**
+     * Upgrade the kraft version.
+     *
+     * This methods upgradeds the kraft version to {@code newVersion}. If the 
version is already
+     * {@code newVersion}, this is a noop operation.
+     *
+     * KRaft only supports upgrades, so {@code newVersion} must be greater 
than or equal to curent
+     * kraft version {@code persistedVersion}.
+     *
+     * For the upgrade to succeed all of the voters in the voter set must 
support the new kraft
+     * version. The upgrade from kraft version 0 to kraft version 1 generate 
one control batch
+     * with one control record setting the kraft version to 1 and one voters 
record setting the
+     * updated voter set.
+     *
+     * When {@code validateOnly} is true only the validation is perform and 
the control records are
+     * not generated.
+     *
+     * @param epoch the current epoch

Review Comment:
   Fixed.



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