Github user nicochen commented on the issue:
@zentol Thanks for replying. Indeed, the problem is caused by MetricFetcher
isn't synchronizing on the `MetricStore` object in MetricFetcher#addMetrics().
But in my opinion, synchronizing on the `MetricStore` is less efficient.
`MetricStore` wrapps more than one metric stores and they serves different
components(e.g Jobmanagerï¼Taskmangers) individually. If synchronizing on the
`MetricStore` , call of addMetrics() on Jobmanger's metric may wait for
addMetrics() on another taskmananger's metric done as they both acquire the
same lock, which is unnecessary.
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