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


##########
fe/be-java-extensions/paimon-scanner/src/main/java/org/apache/doris/paimon/PaimonJniScanner.java:
##########
@@ -363,10 +407,161 @@ protected TableSchema parseTableSchema() throws 
UnsupportedOperationException {
     @Override
     public Map<String, String> getStatistics() {
         Map<String, String> statistics = new HashMap<>();
-        statistics.put("counter:PaimonJniIOManagerEnabled", ioManager != null 
? "1" : "0");
+        statistics.put("gauge:PaimonJniIOManagerEnabled", ioManager != null ? 
"1" : "0");
+        statistics.put("gauge:PaimonJniActiveScannerCount", 
String.valueOf(ACTIVE_SCANNERS.get()));
+        statistics.put("peak:PaimonJniActiveScannerPeakCount", 
String.valueOf(PEAK_ACTIVE_SCANNERS.get()));

Review Comment:
   The additive aggregation issue is fixed, but these Java peak values are 
still JVM-lifetime high-water marks. `PEAK_ACTIVE_SCANNERS` and 
`PEAK_ASYNC_READER_THREADS` are static and only ever move upward via 
`updatePeak()`, with no reset at query/profile boundaries. After one query 
drives `PaimonJniActiveScannerPeakCount` to, say, 100, a later query with a 
single Paimon JNI split will still emit 
`peak:PaimonJniActiveScannerPeakCount=100`, and the new per-query 
`RuntimeProfile::ConditionCounter` will record that stale value as this query's 
peak. That makes the query profile report historical BE-wide peaks as if they 
belonged to the current query. Please either keep these peak states scoped to 
the current query/profile, or expose them as explicitly BE/JVM-lifetime metrics 
outside the per-query profile.



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