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


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java:
##########
@@ -1127,6 +1127,7 @@ private void closePartitionMetadataProvider() {
    */
   private void cleanupMetrics() {
     _serverMetrics.removeTableGauge(_clientId, 
ServerGauge.LLC_PARTITION_CONSUMING);
+    _realtimeTableDataManager.onConsumingToDropped(_segmentNameStr);

Review Comment:
   BTW, in case we don't want to call `onConsumingToDropped` here we should 
change the javadoc of this method, which is quite clear:
   
   ```java
     /**
      * Cleans up the metrics that reflects the state of the realtime segment.
      * This step is essential as the instance may not be the target location 
for some of the partitions.
      * E.g. if the number of partitions increases, or a host swap is needed, 
the target location for some partitions
      * may change,
      * and the current host remains to run. In this case, the current server 
would still keep the state of the old
      * partitions,
      * which no longer resides in this host any more, thus causes false 
positive information to the metric system.
      */
   ```



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to