showuon commented on code in PR #14484:
URL: https://github.com/apache/kafka/pull/14484#discussion_r1346904116


##########
docs/upgrade.html:
##########
@@ -145,7 +145,7 @@ <h5><a id="upgrade_350_kraft" 
href="#upgrade_350_kraft">Upgrading KRaft-based cl
             </code>
         </li>
         <li>Note that the cluster metadata version cannot be downgraded to a 
pre-production 3.0.x, 3.1.x, or 3.2.x version once it has been upgraded.
-            However, it is possible to downgrade to production versions such 
as 3.3-IV0, 3.3-IV1, etc.</li>
+            However, it is possible to downgrade to a backwards compatible 
metadata version. The active Controller will block any incompatible downgrade 
attempt.</li>

Review Comment:
   From what I can see:
   
https://github.com/apache/kafka/blob/fbc39bcdbe5ebcb07435f467b77f4b7df2e910f4/server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java#L170-L186
   
   The version v3.6.0 (using `IBP_3_6_IV2`) and v3.5.0 (using `IBP_3_5_IV2`) 
and older ones are not able to downgrade to any version since the last 
parameter (`didMetadataChange`) is true, right? If so, the line is still 
confusing users, right?



##########
metadata/src/main/java/org/apache/kafka/controller/FeatureControlManager.java:
##########
@@ -344,7 +344,7 @@ private ApiError updateMetadataVersion(
                 log.warn("Downgrading metadata.version from {} to {}.", 
currentVersion, newVersion);
             } else if (allowUnsafeDowngrade) {
                 return invalidMetadataVersion(newVersionLevel, "Unsafe 
metadata downgrade is not supported " +
-                        "in this version.");
+                        "in this Kafka version.");

Review Comment:
   1. I'm thinking we should also change the error message in L350-352, to not 
mention anything about `UNSAFE_DOWNGRADE`. Also add a comment above L350 saying 
we should add it back once unsafe downgrade is implemented.
   2. `Unsafe metadata downgrade is not supported in this Kafka version` will 
make users wonder "in which kafka version" it will be supported. Maybe we can 
just say: `Unsafe metadata downgrade is not supported. ` WDYT?
   
   Also, we should add a sub-task in 
[KAFKA-14175](https://issues.apache.org/jira/browse/KAFKA-14175) for document 
update after unsafe downgrade is implemented.



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