bbejeck opened a new pull request, #19956: URL: https://github.com/apache/kafka/pull/19956
PR #16922 is part of [KIP-892](https://cwiki.apache.org/confluence/display/KAFKA/KIP-892%3A+Transactional+Semantics+for+StateStores) to enable transactional semantics for state stores. In particular, on starting a Kafka Streams instance, if it has pre-existing state, the state stores are initialized on the main thread. Part of this initialization registers the stateful metrics with the JMX thread-id tag of `main`. This breaks the KIP-1076 implementation where need to register metrics with thread-id tags of `xxxStreamThread-N`. This is necessary due to the fact that the `StreamsMetric` is a singleton shared by all `StreamThread` instances, so we need to make sure only add metrics for the current `StreamThread` otherwise duplicate metrics are registered. By registering metrics on the main thread, state metrics `size-all-mem-tables`, `estimate-num-keys`, and `block-cache-useage` get omitted. This PR reverts the changes until a fix is implemented, allowing the individual `Stream Thread`s to register the metrics. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org