fvaleri commented on code in PR #22384:
URL: https://github.com/apache/kafka/pull/22384#discussion_r3324220555
##########
metadata/src/main/java/org/apache/kafka/metadata/storage/Formatter.java:
##########
@@ -236,6 +236,17 @@ public void run() throws Exception {
if (clusterId == null) {
throw new FormatterException("You must specify the cluster id.");
}
+ try {
+ if (clusterId.contains("=")) {
+ throw new FormatterException("The specified cluster id, " +
clusterId + " contains padding and is invalid");
+ }
+ Uuid uuid = Uuid.fromString(clusterId);
+ if (Uuid.RESERVED.contains(uuid)) {
+ throw new FormatterException("The specified cluster id, " +
clusterId + " is reserved");
+ }
Review Comment:
Good point. Let's add a comment about this for future reference.
--
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]