Package com.linkedin.venice.controller
Class DeferredVersionSwapService
java.lang.Object
com.linkedin.venice.service.AbstractVeniceService
com.linkedin.venice.controller.DeferredVersionSwapService
- All Implemented Interfaces:
Closeable,AutoCloseable
This service is in charge of swapping to a new version after a specified wait time in the remaining regions of a target region push if enabled.
The wait time is specified through a store/version level config (target_swap_region_wait_time) and the default wait time is 60m.
This service also updates the parent version status of a store w/ a terminal push status after performing the swap
or deeming it ineligible for a version swap and the statuses mean:
1. ONLINE - all regions are serving the target version
2. PARTIALLY_ONLINE - 1+ regions are serving the target version, but 1+ regions' pushes failed & are serving the old version
3. ERROR - all regions are serving the old version. the push failed in target regions
-
Nested Class Summary
Nested classes/interfaces inherited from class com.linkedin.venice.service.AbstractVeniceService
AbstractVeniceService.ServiceState -
Field Summary
Fields inherited from class com.linkedin.venice.service.AbstractVeniceService
logger, serviceState -
Constructor Summary
ConstructorsConstructorDescriptionDeferredVersionSwapService(VeniceParentHelixAdmin admin, VeniceControllerMultiClusterConfig multiClusterConfig, DeferredVersionSwapStats deferredVersionSwapStats) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidvoidupdateStore(String clusterName, String storeName, VersionStatus status, int targetVersionNum)
-
Constructor Details
-
DeferredVersionSwapService
public DeferredVersionSwapService(VeniceParentHelixAdmin admin, VeniceControllerMultiClusterConfig multiClusterConfig, DeferredVersionSwapStats deferredVersionSwapStats)
-
-
Method Details
-
startInner
- Specified by:
startInnerin classAbstractVeniceService- Returns:
- true if the service is completely started,
false if it is still starting asynchronously (in this case, it is the implementer's
responsibility to set
AbstractVeniceService.serviceStatetoAbstractVeniceService.ServiceState.STARTEDupon completion of the async work). - Throws:
Exception
-
stopInner
- Specified by:
stopInnerin classAbstractVeniceService- Throws:
Exception
-
updateStore
public void updateStore(String clusterName, String storeName, VersionStatus status, int targetVersionNum)
-