hachikuji commented on a change in pull request #10492:
URL: https://github.com/apache/kafka/pull/10492#discussion_r608789181



##########
File path: clients/src/main/java/org/apache/kafka/common/Uuid.java
##########
@@ -27,6 +27,10 @@
  */
 public class Uuid implements Comparable<Uuid> {
 
+    /**
+     * A UUID for the metadata topic in KRaft mode. Will never be returned by 
the randomUuid method.
+     */
+    public static final Uuid METADATA_TOPIC_ID = new Uuid(0L, 1L);
     private static final java.util.UUID SENTINEL_ID_INTERNAL = new 
java.util.UUID(0L, 1L);

Review comment:
       Is this used for anything else? Maybe we can choose a consistent name?

##########
File path: core/src/main/scala/kafka/tools/TestRaftServer.scala
##########
@@ -52,6 +52,7 @@ class TestRaftServer(
   import kafka.tools.TestRaftServer._
 
   private val partition = new TopicPartition("__cluster_metadata", 0)
+  private val topicId = Uuid.METADATA_TOPIC_ID

Review comment:
       I'm a tad concerned about reusing the same topic id in a different 
context. Maybe instead we could hard-code a different sentinel and use it only 
here, say `new Uuid(0L, 2L)`. Then we can also change the topic name to 
`__raft_performance_test` or something like that. That should be enough to 
prevent any potential conflicts.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to