Irene Rodriguez
09/02/2026, 7:56 AMSourceSplitMetricGroup), but these metric groups are never released after the split finishes. Over a few days, this fills up the heap, triggers heavy GC saturation, causes source starvation, and increases consumer lag until we restart the job.
Our heap dump shows that 99.9% of the leaked metric groups contain the 'split' key.
Is there already a JIRA issue or a PR tracking this lifecycle cleanup bug for FLIP-513? If not, we can create a JIRA issue with our heap dump findings.
Also, is there a recommended configuration workaround to completely disable/exclude these split-level watermark metrics in Flink 2.2 to prevent registration in the meantime?
Thanks!Efrat Levitan
09/02/2026, 8:52 AMIrene Rodriguez
09/02/2026, 8:59 AMIrene Rodriguez
09/02/2026, 9:41 AMwatermark child, not the <splitId> group above it.Aakash Sandhyan
09/02/2026, 10:22 AMonSplitFinished() is at L195 of release-2.2.0, so we do have it. That's
what makes this a separate gap rather than a missing backport: we run 2.2, that code is
active, and we still retain ~301k of these groups.
The fix closes splitWatermarkMetricGroup β the inner watermark child β and that part
works. What nothing does is detach either group from the parent:
β’ the <splitId> group from addGroup(SPLIT, splitId) github.com/Efrat19/flink/blob/β¦/InternalSourceSplitMetricGroup.java#β¦ is never closed at all.
β’ AbstractMetricGroup.close() clears a group's own groups/metrics maps but never
removes it from its parent's map β github.com/Efrat19/flink/blob/β¦/InternalSourceSplitMetricGroup.java#β¦
Heap dump of one TaskManager, 1.4 days uptime, on 2.2:
GenericValueMetricGroup (<splitId>) 301,792 closed=false β never closed
GenericMetricGroup ("watermark") 301,709 closed=true β closed, still attached
β ~983 MB of a 1.67 GB live heap
Both still reachable via <operator>.groups["split"].groups[<splitId>].
And #26388 clearly does its job on the metrics: 301,591 of those watermark groups have metrics.size == 0, and only 208 TimerGauge are retained instead of ~600k. The metrics are
deregistered; the group objects aren't released.
So it looks like a follow-up to FLINK-37596 rather than a duplicate.Efrat Levitan
09/02/2026, 11:32 AMaddGroup on the parent
I'm looking into into possible solutionsIrene Rodriguez
09/03/2026, 7:19 AMEfrat Levitan
09/03/2026, 9:17 AMIrene Rodriguez
09/03/2026, 9:42 AMAakash Sandhyan
09/03/2026, 2:51 PMEfrat Levitan
09/03/2026, 4:39 PMAakash Sandhyan
09/03/2026, 10:29 PMIrene Rodriguez
09/04/2026, 7:11 AMIrene Rodriguez
09/04/2026, 8:18 AMEfrat Levitan
09/07/2026, 7:56 AMAakash Sandhyan
09/07/2026, 8:45 AM