m1a2st commented on code in PR #23502:
URL: https://github.com/apache/kafka/pull/23502#discussion_r4080607226


##########
metadata/src/main/java/org/apache/kafka/controller/ConfigurationControlManager.java:
##########
@@ -378,9 +379,8 @@ private ApiError validateAlterConfig(
                 return INVALID_CORDONED_LOG_DIRS_ERROR;
             } else if (configRecord.value() == null) {
                 allConfigs.remove(configRecord.name());
-            } else if (configRecord.value().length() > Short.MAX_VALUE) {
-                // In KRaft mode, large config values cannot be created by 
appending.
-                // If the size exceeds Short.MAX_VALUE, this error will be 
thrown to notify the user.
+            } else if 
(configRecord.value().getBytes(StandardCharsets.UTF_8).length > 
Short.MAX_VALUE) {
+                // The ConfigRecord value cannot exceed Short.MAX_VALUE UTF-8 
bytes.

Review Comment:
   Maybe we should keep the original context, for example:
   
   ```
   Large config values cannot be created by appending. If the size exceeds 
`Short.MAX_VALUE` UTF-8 bytes, an error will be thrown to notify the user.
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to