Class LeakedPushStatusCleanUpService

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class LeakedPushStatusCleanUpService
    extends AbstractVeniceService
    LeakedPushStatusCleanUpService will wake up regularly (interval is determined by controller config ConfigKeys.LEAKED_PUSH_STATUS_CLEAN_UP_SERVICE_SLEEP_INTERVAL_MS), get all existing push status ZNodes on Zookeeper that belong to the specified cluster, without scanning through the replica statuses, find all leaked push status and delete them on Zookeeper. The life cycle of LeakedPushStatusCleanUpService matches the life cycle of HelixVeniceClusterResources, meaning that there is one clean up service for each cluster, and it's built when the controller is promoted to leader role for the cluster. The clean up service is needed because push job killing in server nodes is asynchronous, it's possible that servers write push status after controllers think they have cleaned up the push status.