gortiz commented on code in PR #12403:
URL: https://github.com/apache/pinot/pull/12403#discussion_r1497321255
##########
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:
I'm going to remove this code because that is not correctly deleting the
server metrics. It seems even after `
_instanceDataManager.deleteTable(_tableNameWithType);` is called other threads
are updating these metrics, so some of the deleted metrics here are created
again. Specifically the ones that survive are:
```
"org.apache.pinot.common.metrics":name="pinot.server.endToEndRealtimeIngestionDelayMs.meetupRsvp_REALTIME.X",type="ServerMetrics"
"org.apache.pinot.common.metrics":name="pinot.server.highestStreamOffsetConsumed.meetupRsvp_REALTIME-meetupRSVPEvents-X",type="ServerMetrics"
"org.apache.pinot.common.metrics":name="pinot.server.lastRealtimeSegmentCompletionDurationSeconds.meetupRsvp_REALTIME-meetupRSVPEvents-X",type="ServerMetrics"
"org.apache.pinot.common.metrics":name="pinot.server.lastRealtimeSegmentCreationDurationSeconds.meetupRsvp_REALTIME-meetupRSVPEvents-X",type="ServerMetrics"
"org.apache.pinot.common.metrics":name="pinot.server.lastRealtimeSegmentInitialConsumptionDurationSeconds.meetupRsvp_REALTIME-meetupRSVPEvents-X",type="ServerMetrics"
"org.apache.pinot.common.metrics":name="pinot.server.meetupRsvp.segmentUploadSuccess",type="ServerMetrics"
"org.apache.pinot.common.metrics":name="pinot.server.meetupRsvp.segmentUploadTimeMs",type="ServerMetrics"
"org.apache.pinot.common.metrics":name="pinot.server.meetupRsvp_REALTIME-meetupRSVPEvents-X.realtimeRowsConsumed",type="ServerMetrics"
"org.apache.pinot.common.metrics":name="pinot.server.realtimeOffheapMemoryUsed.meetupRsvp",type="ServerMetrics"
```
--
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]