Skip to content

Commit

Permalink
do not adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
dnhatn committed Jul 23, 2019
1 parent e6923e8 commit 6ec4e80
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1402,10 +1402,8 @@ public long recoverLocallyUpToGlobalCheckpoint() {
try {
final Engine.TranslogRecoveryRunner translogRecoveryRunner = (engine, snapshot) -> {
recoveryState.getTranslog().totalLocal(snapshot.totalOperations());
final int recoveredOps = runTranslogRecovery(engine, snapshot, Engine.Operation.Origin.LOCAL_TRANSLOG_RECOVERY,
return runTranslogRecovery(engine, snapshot, Engine.Operation.Origin.LOCAL_TRANSLOG_RECOVERY,
recoveryState.getTranslog()::incrementRecoveredOperations);
recoveryState.getTranslog().totalLocal(recoveredOps); // adjust the total local to reflect the actual count
return recoveredOps;
};
innerOpenEngineAndTranslog();
getEngine().recoverFromTranslog(translogRecoveryRunner, globalCheckpoint);
Expand Down

0 comments on commit 6ec4e80

Please sign in to comment.