arjun4084346 commented on code in PR #4031: URL: https://github.com/apache/gobblin/pull/4031#discussion_r1737636242
########## gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManagerMetrics.java: ########## @@ -271,8 +267,7 @@ protected static MetricNameRegexFilter getMetricsFilterForDagManager() { } public void cleanup() { - // Add null check so that unit test will not affect each other when we de-active non-instrumented DagManager - if(this.metricContext != null && this.metricContext.getTagMap().get(GobblinMetricsKeys.CLASS_META).equals(DagManager.class.getSimpleName())) { + if (this.metricContext != null && this.metricContext.getTagMap().get(GobblinMetricsKeys.CLASS_META).equals(DagManagerMetrics.class.getSimpleName())) { // The DMThread's metrics mappings follow the lifecycle of the DMThread itself and so are lost by DM deactivation-reactivation but the RootMetricContext is a (persistent) singleton. // To avoid IllegalArgumentException by the RMC preventing (re-)add of a metric already known, remove all metrics that a new DMThread thread would attempt to add (in DagManagerThread::initialize) whenever running post-re-enablement RootMetricContext.get().removeMatching(getMetricsFilterForDagManager()); Review Comment: yea i noticed it, but just could not understand what the comment mean. @Will-Lo any suggestion what the new comment should be, otherwise will remove it -- 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: dev-unsubscr...@gobblin.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org