Skip to content

Commit

Permalink
Rename createNewTranslog to fileBasedRecovery (#31508)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dnhatn committed Jun 21, 2018
1 parent e0bc4d5 commit 0883ebe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -449,13 +449,13 @@ public void phase1(final IndexCommit snapshot, final Supplier<Integer> translogO
}
}

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ public void phase1(final IndexCommit snapshot, final Supplier<Integer> translogO
}

@Override
void prepareTargetForTranslog(final boolean createNewTranslog, final int totalTranslogOps) throws IOException {
void prepareTargetForTranslog(final boolean fileBasedRecovery, final int totalTranslogOps) throws IOException {
prepareTargetForTranslogCalled.set(true);
}

Expand Down

0 comments on commit 0883ebe

Please sign in to comment.