xiangfu0 commented on code in PR #10027: URL: https://github.com/apache/pinot/pull/10027#discussion_r1061933761
########## pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/cleanup/StaleInstancesCleanupTask.java: ########## @@ -34,23 +36,30 @@ /** - * A periodic task to clean up offline Minion instances to not spam Helix. + * Automatically removes stale instances from the cluster to not spam Helix. + * Stale instance is the instance not in use (not hosting any data or query) and has been in the offline status for more + * than the stale instance retention time. */ -public class MinionInstancesCleanupTask extends BasePeriodicTask { - private static final Logger LOGGER = LoggerFactory.getLogger(MinionInstancesCleanupTask.class); - private final static String TASK_NAME = "MinionInstancesCleanupTask"; +public class StaleInstancesCleanupTask extends BasePeriodicTask { + private static final Logger LOGGER = LoggerFactory.getLogger(StaleInstancesCleanupTask.class); + private final static String TASK_NAME = "StaleInstancesCleanupTask"; + protected final PinotHelixResourceManager _pinotHelixResourceManager; protected final LeadControllerManager _leadControllerManager; protected final ControllerMetrics _controllerMetrics; + // This applies to both broker and server instances. + private final long _staleInstancesCleanupTaskMinOfflineTimeBeforeDeletionInMilliseconds; private final long _minionInstanceCleanupTaskMinOfflineTimeBeforeDeletionInMilliseconds; Review Comment: removed. -- 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