morrySnow commented on code in PR #64742:
URL: https://github.com/apache/doris/pull/64742#discussion_r3464464885


##########
fe/fe-core/src/main/java/org/apache/doris/metric/MetricRepo.java:
##########
@@ -438,6 +445,31 @@ public Integer getValue() {
             }
         };
         DORIS_METRIC_REGISTER.addMetrics(connections);
+        GAUGE_ARROW_FLIGHT_CONNECTIONS = new 
GaugeMetric<Integer>("arrow_flight_connection_total",
+                MetricUnit.CONNECTIONS, "total arrow flight connections") {
+            @Override
+            public Integer getValue() {
+                return 
ExecuteEnv.getInstance().getScheduler().getFlightSqlConnectPoolMgr().getConnectionNum();
+            }
+        };
+        DORIS_METRIC_REGISTER.addMetrics(GAUGE_ARROW_FLIGHT_CONNECTIONS);
+        GAUGE_CONNECTION_MAX = new GaugeMetric<Integer>("connection_max",
+                MetricUnit.CONNECTIONS, "max connections") {
+            @Override

Review Comment:
   Fixed in 92a9a268181: `doris_fe_connection_max` now reports 
`Config.qe_max_connection + Config.arrow_flight_max_connections`, so it matches 
the same MySQL + Arrow Flight scope as `doris_fe_connection_total`. I also 
updated `MetricsTest` to assert the combined value.



##########
fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/Auth.java:
##########
@@ -586,6 +587,8 @@ private void createUserInternal(UserIdentity userIdent, 
String roleName, byte[]
             }
             // other user properties
             propertyMgr.addUserResource(userIdent.getQualifiedUser());

Review Comment:
   Fixed in 92a9a268181: per-user max connection metric updates now go through 
serving-Auth guarded helpers in `MetricRepo`, and the initial sync reads from 
`Env.getServingEnv().getAuth()`. I added a test to verify that updates from a 
non-serving `Auth` instance do not overwrite the exported metric.



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