Skip to content

Commit dae520f

Browse files
committed
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.
1 parent 71d52d9 commit dae520f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

server/src/main/java/org/elasticsearch/indices/recovery/RecoverySourceHandler.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -449,13 +449,13 @@ public void phase1(final IndexCommit snapshot, final Supplier<Integer> translogO
449449
}
450450
}
451451

452-
void prepareTargetForTranslog(final boolean createNewTranslog, final int totalTranslogOps) throws IOException {
452+
void prepareTargetForTranslog(final boolean fileBasedRecovery, final int totalTranslogOps) throws IOException {
453453
StopWatch stopWatch = new StopWatch().start();
454454
logger.trace("recovery [phase1]: prepare remote engine for translog");
455455
final long startEngineStart = stopWatch.totalTime().millis();
456456
// Send a request preparing the new shard's translog to receive operations. This ensures the shard engine is started and disables
457457
// garbage collection (not the JVM's GC!) of tombstone deletes.
458-
cancellableThreads.executeIO(() -> recoveryTarget.prepareForTranslogOperations(createNewTranslog, totalTranslogOps));
458+
cancellableThreads.executeIO(() -> recoveryTarget.prepareForTranslogOperations(fileBasedRecovery, totalTranslogOps));
459459
stopWatch.stop();
460460

461461
response.startTime = stopWatch.totalTime().millis() - startEngineStart;

server/src/test/java/org/elasticsearch/indices/recovery/RecoverySourceHandlerTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ public void phase1(final IndexCommit snapshot, final Supplier<Integer> translogO
423423
}
424424

425425
@Override
426-
void prepareTargetForTranslog(final boolean createNewTranslog, final int totalTranslogOps) throws IOException {
426+
void prepareTargetForTranslog(final boolean fileBasedRecovery, final int totalTranslogOps) throws IOException {
427427
prepareTargetForTranslogCalled.set(true);
428428
}
429429

0 commit comments

Comments
 (0)