Github user zentol commented on the issue: https://github.com/apache/flink/pull/2517 that wouldn't solve the concurrency issues. If you have 2 concurrent notifies going on you would pass the same FrontMetricGroup to the reporter, hence for both calls the reporter would work on the same referenced MetricGroup, even though they may be supposed to be different ones. I would propose keeping the current approach of creating a new FrontMetricGroup every time. This means you can simplify that class a lot, since you can now extend `ProxyMetricGroup`, and pass the index through the constructor as well. I don't see a solution where we can get away without creating a new object or putting the entire notification inside a synchronized block (which would be a no-go).
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---