Skip to content

#2336 StatusMetricsBolt: report the status counts as a HashMap - #2337

Merged
dpol1 merged 1 commit into
mainfrom
status-metrics-kryo
Nov 16, 2026
Merged

dpol1 merged 1 commit into
mainfrom
status-metrics-kryo

Conversation

@rzo1

@rzo1 rzo1 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Fixes #2336.

StatusMetricsBolt keeps its counts in a ConcurrentHashMap (since #2242) and reported that map directly. Storm doesn't register ConcurrentHashMap with Kryo, so with more than one worker and a V1 metrics consumer, the status_metrics executor died on Class is not registered: java.util.concurrent.ConcurrentHashMap.

The gauge now returns a HashMap copy of the counts, as in 3.5.1. The map they are kept in stays concurrent, since the counts are updated from the async OpenSearch responses.

StatusMetricsBoltTest serializes the counts with Kryo as Storm sets it up from its defaults, and checks that a ConcurrentHashMap is rejected.

Found while testing 4.0.0 RC1 on Storm 3.2.0 with 4 workers.

The counts are kept in a ConcurrentHashMap, which Storm does not
register with Kryo, so a V1 metrics consumer in another worker could
not receive them and the status_metrics executor died. The gauge now
returns a HashMap copy, as in 3.5.1.
@rzo1 rzo1 added this to the 4.0.0 milestone Nov 16, 2026
@rzo1
rzo1 requested review from dpol1 and jnioche November 16, 2026 09:11
@dpol1
dpol1 merged commit e5fd307 into main Nov 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StatusMetricsBolt: the status.count metric can't be serialized with Kryo

3 participants