gortiz commented on PR #12403: URL: https://github.com/apache/pinot/pull/12403#issuecomment-1956413778
> One assumption in this PR is that all the metrics are managed by SegmentStatusChecker. Is that always the case? Here we are assuming that after calling `SegmentStatusChecker.nonLeaderCleanup` there are not going to be other threads modifying the controller metrics for this table. In case this assumption ends up being not correct, the metric will be deleted here and then added again by the rogue thread. `SegmentStatusChecker` is called by default every 5 mins. Specifically `SegmentStatusChecker.nonLeaderCleanup` is called when `SegmentStatusChecker` is executed and there are tables that during the previous iteration were led by this controller but in this iteration they are not (as long as helix knows). I'm not sure if some rogue thread may be modifying the metrics after `SegmentStatusChecker.nonLeaderCleanup` is called, but doesn't seem probable given the frequency on which we call `SegmentStatusChecker` and in case that happens, it won't be super problematic. In fact it would not be worse than what we had before where some metrics were not deleted. Also, in case that happens, we should manually remove metrics in these services that continue to be running and the deletion here should be seen as a protection in case we forget to remove them somewhere else. -- 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]
