diff --git a/services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceHelixAdmin.java b/services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceHelixAdmin.java index 376eb9811d..76e3d54e8e 100644 --- a/services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceHelixAdmin.java +++ b/services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceHelixAdmin.java @@ -427,7 +427,7 @@ public class VeniceHelixAdmin implements Admin, StoreCleaner { private int defaultMaxRecordSizeBytes; private DataRecoveryManager dataRecoveryManager; - private final CompactionManager compactionManager; + private CompactionManager compactionManager; private ParticipantStoreClientsManager participantStoreClientsManager; protected final PubSubTopicRepository pubSubTopicRepository; @@ -607,13 +607,15 @@ public VeniceHelixAdmin( dataRecoveryManager = new DataRecoveryManager(this, icProvider, pubSubTopicRepository, participantStoreClientsManager); - // TODO extends interchangeable with implements? - // Implementation of the interface RepushOrchestrator depends on the configuration. (see RepushOrchestrator docs) - Class repushOrchestratorClass = - ReflectUtils.loadClass(multiClusterConfigs.getRepushOrchestratorClassName()); - RepushOrchestrator repushOrchestrator = - ReflectUtils.callConstructor(repushOrchestratorClass, new Class[0], new Object[0]); - compactionManager = new CompactionManager(repushOrchestrator); + if (multiClusterConfigs.isLogCompactionEnabled()) { + // TODO extends interchangeable with implements? + // Implementation of the interface RepushOrchestrator depends on the configuration. (see RepushOrchestrator docs) + Class repushOrchestratorClass = + ReflectUtils.loadClass(multiClusterConfigs.getRepushOrchestratorClassName()); + RepushOrchestrator repushOrchestrator = + ReflectUtils.callConstructor(repushOrchestratorClass, new Class[0], new Object[0]); + compactionManager = new CompactionManager(repushOrchestrator); + } List initRoutines = new ArrayList<>(); initRoutines.add(