Skip to content

Commit

Permalink
create version swap service in the controller
Browse files Browse the repository at this point in the history
  • Loading branch information
misyel committed Jan 15, 2025
1 parent aec7d8f commit e6dbf34
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ public VeniceController(VeniceControllerContext ctx) {
this.unusedValueSchemaCleanupService = createUnusedValueSchemaCleanupService();
this.storeGraveyardCleanupService = createStoreGraveyardCleanupService();
this.systemStoreRepairService = createSystemStoreRepairService();
this.deferredVersionSwapService = createDeferredVersionSwapService();
if (multiClusterConfigs.isGrpcServerEnabled()) {
initializeGrpcServer();
}
Expand Down Expand Up @@ -275,6 +276,14 @@ private Optional<UnusedValueSchemaCleanupService> createUnusedValueSchemaCleanup
return Optional.empty();
}

private Optional<DeferredVersionSwapService> createDeferredVersionSwapService() {
if (multiClusterConfigs.isParent()) {
Admin admin = controllerService.getVeniceHelixAdmin();
return Optional.of(new DeferredVersionSwapService((VeniceParentHelixAdmin) admin, multiClusterConfigs));
}
return Optional.empty();
}

// package-private for testing
private void initializeGrpcServer() {
LOGGER.info("Initializing gRPC server as it is enabled for the controller...");
Expand Down

0 comments on commit e6dbf34

Please sign in to comment.