github-actions[bot] commented on code in PR #63576:
URL: https://github.com/apache/doris/pull/63576#discussion_r3302292910


##########
fe/fe-core/src/main/java/org/apache/doris/metric/MetricRepo.java:
##########
@@ -1191,6 +1202,64 @@ public Long getValue() {
         DORIS_METRIC_REGISTER.addMetrics(gauge);
     }
 
+    public static void updateRoutineLoadJobPerJobMetrics() {
+        if (!Env.getCurrentEnv().isMaster()) {
+            return;
+        }

Review Comment:
   This returns before removing the per-job routine-load gauges. If an FE has 
served `/metrics` as master, these gauges are registered with suppliers that do 
not check `Env.getCurrentEnv().isMaster()`. After the FE loses mastership, 
`getMetric()` still calls this method, returns here, and then 
`DORIS_METRIC_REGISTER.accept(visitor)` continues to export the old per-job 
values from the previous master epoch. That differs from the existing aggregate 
routine-load gauges, which return `0L` on non-master. Please either remove 
these metric names before the master check, or make each generated gauge return 
`0L`/avoid export when the FE is no longer master.



-- 
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