@Override public ILSMIOOperation scheduleMerge(ILSMIndexOperationContext ctx) throws HyracksDataException { ILSMIOOperation operation; synchronized (opTracker) { operation = lsmIndex.createMergeOperation(ctx); } ioScheduler.scheduleOperation(operation); return operation; }
@Override public ILSMIOOperation scheduleFullMerge(ILSMIndexOperationContext ctx) throws HyracksDataException { ILSMIOOperation operation; synchronized (opTracker) { fullMergeIsRequested.set(true); ctx.getComponentsToBeMerged().addAll(lsmIndex.getDiskComponents()); operation = lsmIndex.createMergeOperation(ctx); if (operation != NoOpIoOperation.INSTANCE) { fullMergeIsRequested.set(false); } // If the merge cannot be scheduled because there is already an ongoing merge on // subset/all of the components, then whenever the current merge has finished, // it will schedule the full merge again. } ioScheduler.scheduleOperation(operation); return operation; }