Rename createNewTranslog to fileBasedRecovery (#31508)
We renamed `createNewTranslog` to `fileBasedRecovery` in the RecoveryTarget but did not do this for RecoverySourceHandler. This commit makes sure that we a consistent parameter in both recovery source and target.
This commit is contained in:
parent
6f3e97f2b7
commit
048a92bf39
|
@ -449,13 +449,13 @@ public class RecoverySourceHandler {
|
|||
}
|
||||
}
|
||||
|
||||
void prepareTargetForTranslog(final boolean createNewTranslog, final int totalTranslogOps) throws IOException {
|
||||
void prepareTargetForTranslog(final boolean fileBasedRecovery, final int totalTranslogOps) throws IOException {
|
||||
StopWatch stopWatch = new StopWatch().start();
|
||||
logger.trace("recovery [phase1]: prepare remote engine for translog");
|
||||
final long startEngineStart = stopWatch.totalTime().millis();
|
||||
// Send a request preparing the new shard's translog to receive operations. This ensures the shard engine is started and disables
|
||||
// garbage collection (not the JVM's GC!) of tombstone deletes.
|
||||
cancellableThreads.executeIO(() -> recoveryTarget.prepareForTranslogOperations(createNewTranslog, totalTranslogOps));
|
||||
cancellableThreads.executeIO(() -> recoveryTarget.prepareForTranslogOperations(fileBasedRecovery, totalTranslogOps));
|
||||
stopWatch.stop();
|
||||
|
||||
response.startTime = stopWatch.totalTime().millis() - startEngineStart;
|
||||
|
|
|
@ -423,7 +423,7 @@ public class RecoverySourceHandlerTests extends ESTestCase {
|
|||
}
|
||||
|
||||
@Override
|
||||
void prepareTargetForTranslog(final boolean createNewTranslog, final int totalTranslogOps) throws IOException {
|
||||
void prepareTargetForTranslog(final boolean fileBasedRecovery, final int totalTranslogOps) throws IOException {
|
||||
prepareTargetForTranslogCalled.set(true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue