Skip to content

Commit

Permalink
Add empty translog creation for remote store restore
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin Kale <kalsac@amazon.com>
  • Loading branch information
Sachin Kale committed Jun 30, 2022
1 parent 6560944 commit d5ac191
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,11 @@ private void recoverFromRemoteStore(IndexShard indexShard) throws IndexShardReco
for (String file : remoteDirectory.listAll()) {
storeDirectory.copyFrom(remoteDirectory, file, file, IOContext.DEFAULT);
}
indexShard.recoveryState().getIndex().setFileDetailsComplete();
// This creates empty trans-log for now
// ToDo: Add code to restore remote trans-log
bootstrap(indexShard, store);
assert indexShard.shardRouting.primary() : "only primary shards can recover from store";
indexShard.recoveryState().getIndex().setFileDetailsComplete();
indexShard.openEngineAndRecoverFromTranslog();
indexShard.getEngine().fillSeqNoGaps(indexShard.getPendingPrimaryTerm());
indexShard.finalizeRecovery();
Expand Down

0 comments on commit d5ac191

Please sign in to comment.