Reverse the logic so it is correct.
@@ -40,22 +40,22 @@ injectLidSpaceCompactionJobs(MaintenanceController &controller,
IMaintenanceJob::UP job;
if (config.getLidSpaceCompactionConfig().useBucketExecutor()) {
- job = std::make_unique<LidSpaceCompactionJob>(
+ job = std::make_unique<lidspace::CompactionJob>(
config.getLidSpaceCompactionConfig(),
- *lidHandler, opStorer, fbHandler,
+ *lidHandler, opStorer, controller.masterThread(), bucketExecutor,
diskMemUsageNotifier,
config.getBlockableJobConfig(),
clusterStateChangedNotifier,
- (calc ? calc->nodeRetired() : false));
+ (calc ? calc->nodeRetired() : false),
+ bucketSpace);
} else {
- job = std::make_unique<lidspace::CompactionJob>(
+ job = std::make_unique<LidSpaceCompactionJob>(
config.getLidSpaceCompactionConfig(),
- *lidHandler, opStorer, controller.masterThread(), bucketExecutor,
+ *lidHandler, opStorer, fbHandler,
diskMemUsageNotifier,
config.getBlockableJobConfig(),
clusterStateChangedNotifier,
- (calc ? calc->nodeRetired() : false),
- bucketSpace);
+ (calc ? calc->nodeRetired() : false));
}
controller.registerJobInMasterThread(trackJob(tracker, std::move(job)));
}
