aliehsaeedii opened a new pull request, #23762: URL: https://github.com/apache/kafka/pull/23762
`TopologyDescriptionFormatter` labelled global stores starting at `subtopologies().size()`, assuming regular subtopologies are numbered `0..N-1`. Kafka Streams assigns subtopology and global store ids from a single contiguous counter (`InternalTopologyBuilder#makeNodeGroups`), so when a global store is defined first it gets id `0` and the regular subtopologies get `1..N`, and `kafka-streams-groups.sh --describe --topology` printed a global store label that collided with a real subtopology id. `TopologyDescriptionConverter` sends both lists sorted by id, so the global store ids are exactly the ids not taken by a subtopology, in ascending order. Each global store is now labelled with the lowest unused id. This matches stock `TopologyDescription#toString()` output without any protocol change, and can never collide with a subtopology id. Non-numeric subtopology ids are ignored, since they cannot collide with a numeric label. Testing: added `TopologyDescriptionFormatterTest` cases for a global store defined before the subtopologies, global stores interleaved with subtopologies, and non-numeric subtopology ids. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
