/** * perform the last stages of recovery once all translog operations are done. * note that you should still call {@link #postRecovery(String)}. */ public void finalizeRecovery() { recoveryState().setStage(RecoveryState.Stage.FINALIZE); Engine engine = getEngine(); engine.refresh("recovery_finalization"); engine.config().setEnableGcDeletes(true); }
/** * perform the last stages of recovery once all translog operations are done. * note that you should still call {@link #postRecovery(String)}. */ public void finalizeRecovery() { recoveryState().setStage(RecoveryState.Stage.FINALIZE); Engine engine = getEngine(); engine.refresh("recovery_finalization"); engine.config().setEnableGcDeletes(true); }
/** * Applies all operations in the iterable to the current engine and returns the number of operations applied. * This operation will stop applying operations once an operation failed to apply. * Note: This method is typically used in peer recovery to replay remote transaction log entries. */ public int performBatchRecovery(Iterable<Translog.Operation> operations) { if (state != IndexShardState.RECOVERING) { throw new IndexShardNotRecoveringException(shardId, state); } // We set active because we are now writing operations to the engine; this way, if we go idle after some time and become inactive, // we still invoke any onShardInactive listeners ... we won't sync'd flush in this case because we only do that on primary and this // is a replica active.set(true); Engine engine = getEngine(); return engine.config().getTranslogRecoveryPerformer().performBatchRecovery(engine, operations); }
/** * perform the last stages of recovery once all translog operations are done. * note that you should still call {@link #postRecovery(String)}. */ public void finalizeRecovery() { recoveryState().setStage(RecoveryState.Stage.FINALIZE); Engine engine = getEngine(); engine.refresh("recovery_finalization"); engine.config().setEnableGcDeletes(true); }
/** * perform the last stages of recovery once all translog operations are done. * note that you should still call {@link #postRecovery(String)}. */ public void finalizeRecovery() { recoveryState().setStage(RecoveryState.Stage.FINALIZE); Engine engine = getEngine(); engine.refresh("recovery_finalization"); engine.config().setEnableGcDeletes(true); }
try { final Searcher retVal = newSearcher(source, searcher, manager); final Searcher wrappedSearcher = maybeWrap ? config().getWrappingService().wrap(engineConfig, retVal) : retVal; success = true; return wrappedSearcher;