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


##########
core/src/main/scala/kafka/tools/StorageTool.scala:
##########
@@ -60,7 +63,11 @@ object StorageTool extends Logging {
           if (!metadataVersion.isKRaftSupported) {
             throw new TerseFailure(s"Must specify a valid KRaft metadata 
version of at least 3.0.")
           }
-          val metaProperties = buildMetadataProperties(clusterId, config.get)

Review Comment:
   The KRaft formatting tool did have a requirement that the cluster ID had to 
be a Kafka UUID for a while. However, cluster ID has always been a string when 
in ZK mode. Because we now support migration from ZK to KRaft, we need to 
support cluster ID as a string.
   
   If we want to have cluster IDs be UUIDs then I think it would be better to 
have the discussion on the mailing list than here in this PR. The main question 
we'd have to answer is how to convert existing string cluster IDs to UUID. 
Another option, I suppose, would be to require a UUID for new clusters, but 
allow the arbitrary string for old ones. The main advantage of that would 
probably just be preventing pathological cluster names (people trying to name 
their cluster a whitespace string, or an emoji, etc.)
   
   I don't think we will be able to get to the point where the APIs for 
fetching cluster ID return UUID very easily... it will be a multi-year effort. 
Unfortunately it's very easy to create string IDs, and very hard to get rid of 
them.



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