gortiz commented on code in PR #12403:
URL: https://github.com/apache/pinot/pull/12403#discussion_r1494127142


##########
pinot-server/src/main/java/org/apache/pinot/server/starter/helix/SegmentMessageHandlerFactory.java:
##########
@@ -173,6 +177,17 @@ public HelixTaskResult handleMessage()
       try {
         _instanceDataManager.deleteTable(_tableNameWithType);
         helixTaskResult.setSuccess(true);
+        Arrays.stream(ServerMeter.values())
+            .filter(m -> !m.isGlobal())
+            .forEach(m -> _metrics.removeTableMeter(_tableNameWithType, m));
+        Arrays.stream(ServerGauge.values())
+            .filter(g -> !g.isGlobal())
+            .forEach(g -> _metrics.removeTableGauge(_tableNameWithType, g));
+        Arrays.stream(ServerTimer.values())
+            .filter(t -> !t.isGlobal())
+            .forEach(t -> _metrics.removeTableTimer(_tableNameWithType, t));
+        Arrays.stream(ServerQueryPhase.values())
+            .forEach(p -> _metrics.removePhaseTiming(_tableNameWithType, p));
       } catch (Exception e) {
         _metrics.addMeteredTableValue(_tableNameWithType, 
ServerMeter.DELETE_TABLE_FAILURES, 1);

Review Comment:
   Yes, it is. A sequence like:
   1. Create table A
   2. Fail to delete table A
   3. Successfully delete table A
   
   Will show DELETE_TABLE_FAILURES with value 1 for table A point 2 and 3, but 
won't show that value after 3 is correctly executed. 



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