Skip to content

Commit 968b64c

Browse files
author
Sachin Kale
committed
Fix for failover incremental uploads
Signed-off-by: Sachin Kale <[email protected]>
1 parent 6b1f527 commit 968b64c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

server/src/main/java/org/opensearch/index/shard/RemoteStoreRefreshListener.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ public RemoteStoreRefreshListener(IndexShard indexShard) {
5959
.getDelegate()).getDelegate();
6060
this.primaryTerm = indexShard.getOperationPrimaryTerm();
6161
localSegmentChecksumMap = new HashMap<>();
62+
if (indexShard.shardRouting.primary()) {
63+
try {
64+
this.remoteDirectory.init();
65+
} catch (IOException e) {
66+
logger.error("Exception while initialising RemoteSegmentStoreDirectory", e);
67+
}
68+
}
6269
}
6370

6471
@Override

0 commit comments

Comments
 (0)