You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Alieh Saeedi (Jira)" <ji...@apache.org> on 2026/10/09 11:48:00 UTC
[jira] [Assigned] (KAFKA-21251) kafka-streams-groups.sh --describe --topology: global store sub-topology label can collide with a real subtopology id
[ https://issues.apache.org/jira/browse/KAFKA-21251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alieh Saeedi reassigned KAFKA-21251:
------------------------------------
Assignee: Alieh Saeedi
> kafka-streams-groups.sh --describe --topology: global store sub-topology label can collide with a real subtopology id
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: KAFKA-21251
> URL: https://issues.apache.org/jira/browse/KAFKA-21251
> Project: Kafka
> Issue Type: Bug
> Reporter: Alieh Saeedi
> Assignee: Alieh Saeedi
> Priority: Minor
>
> h2. Problem
> {{TopologyDescriptionFormatter}} (tools/src/main/java/org/apache/kafka/tools/streams/TopologyDescriptionFormatter.java) labels global stores starting at {{{}topology.subtopologies().size(){}}}:
>
> {{int globalStoreId = topology.subtopologies().size();for (final GlobalStore globalStore : topology.globalStores()) { appendGlobalStore(sb, globalStore, globalStoreId++);}}}
> This assumes regular subtopologies are numbered {{{}0..N-1{}}}. In Kafka Streams, global stores and subtopologies share one node-group id counter ({{{}InternalTopologyBuilder{}}}), so if the app defines its global store/table first, the global store gets id {{0}} and regular subtopologies get {{{}1..N{}}}.
> h2. Example
> Global store defined first, then two regular subtopologies (real ids 1, 2). CLI output:
>
> {{Sub-topology: 1Sub-topology: 2Sub-topology: 2 for global store (will not generate tasks) <- collides with real sub-topology 2}}
> Stock Streams {{TopologyDescription.toString()}} would label the global store {{{}0{}}}.
> h2. Impact
> Cosmetic, CLI display only (KIP-1331 {{{}--describe --topology{}}}). Stored/pushed topology data and the CRD are unaffected. Not a release blocker; can confuse operators reading the output.
> h2. Possible fixes
> # Minimal: start global labels at {{max(subtopology id) + 1}} — removes the collision, but may still differ from Streams' own id.
> # Exact: carry the global store's real id in the KIP-1331 description and print it — matches stock Streams output, but needs a protocol/API change.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)