gortiz commented on code in PR #12403:
URL: https://github.com/apache/pinot/pull/12403#discussion_r1497393058
##########
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:
Nope, `SegmentStatusChecker` cleans the controller metrics. This is a server
metric.
Anyway I've changed the code a bit. Semantic is almost the same, but it will
be cleaner that `ServerMeter.DELETE_TABLE_FAILURES` will not be deleted in case
there is an exception.
--
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]