Skip to content

KAFKA-20072 Make Uuid no-dash behavior opt-in#22442

Open
mumrah wants to merge 2 commits into
apache:trunkfrom
mumrah:minor-fixup-topic-ids
Open

KAFKA-20072 Make Uuid no-dash behavior opt-in#22442
mumrah wants to merge 2 commits into
apache:trunkfrom
mumrah:minor-fixup-topic-ids

Conversation

@mumrah
Copy link
Copy Markdown
Member

@mumrah mumrah commented Jun 1, 2026

Instead of changing Uuid#randomUuid to always have the new behavior
introduced in #21313, this patch moves the new logic into a separate
randomUuidNoDashes method.

Since Uuid is a utility class, it is used widely throughout the broker
and client (possibly even applications). In most cases, the presence of
a dash is inconsequential. The new behavior, which comes with a small
performance hit, should not affect these callers. The introduction of a
new Uuid factory makes the new behavior opt-in.

One caller is updated to use the new factory which is where the
controller allocates topic IDs. This matches the intention of the
original Jira.

@mumrah
Copy link
Copy Markdown
Member Author

mumrah commented Jun 1, 2026

cc @mimaison @ijuma

Copy link
Copy Markdown
Contributor

@nileshkumar3 nileshkumar3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, clear change making the no-dash behavior opt-in via randomUuidNoDashes() and using it in ReplicationControlManager#createTopic — that matches the intent of KAFKA-20072 for topic IDs. Should bin/kafka-storage.sh random-uuid, or any other operator-facing ID generation sites, remain unchanged, or would it make sense to consider them as a follow-up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants