empiredan commented on code in PR #1857:
URL: 
https://github.com/apache/incubator-pegasus/pull/1857#discussion_r1456852112


##########
collector/metrics/metric_collector.go:
##########
@@ -283,13 +277,13 @@ func updateClusterLevelTableMetrics(metricsByTableID 
map[string]Metrics) {
                        tableName = name
                }
                for _, metric := range metrics {
-                       updateMetric(metric, "cluster", "table", tableName)
+                       collector.updateMetric(metric, "cluster", "table", 
tableName)
                }
        }
 }
 
-func updateMetric(metric Metric, endpoint string, level string, title string) {
-       role := RoleByDataSource[DataSource]
+func (collector *Collector) updateMetric(metric Metric, endpoint string, level 
string, title string) {
+       role := collector.role

Review Comment:
   Could the variable `role` be removed ?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to