pengding-stripe commented on code in PR #13266:
URL: https://github.com/apache/pinot/pull/13266#discussion_r1625113936


##########
pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/cleanup/SchemaCleanupTaskStatelessTest.java:
##########
@@ -97,6 +97,7 @@ public void teardown() {
   public void testSchemaCleanupTask()
       throws Exception {
     PinotMetricUtils.cleanUp();
+    PinotMetricUtils.getPinotMetricsRegistry();

Review Comment:
   I don't think the failed test is because ControllerMetrics is uninitialized, 
but because of ControllerMetrics needs to call PinotMetricUtils when emitting 
metrics and PinotMetricUtils was cleaned up at the beginning of the test. I can 
also delete `PinotMetricUtils.cleanUp();` but I am not sure if that line is 
useful for other purpose.
   
   This is where NPE was thrown
   
https://github.com/apache/pinot/blob/4eeae1197d9f70b4c33e7220c0dc3a073e783648/pinot-common/src/main/java/org/apache/pinot/common/metrics/AbstractMetrics.java#L340



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