Skip to content

Commit

Permalink
Fix BlobStoreIncrementalityIT
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 Sep 4, 2023
1 parent 6c2d70a commit 892d78a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,12 @@ private void snapshot(
if (indexShard.routingEntry().primary() == false) {
throw new IndexShardSnapshotFailedException(shardId, "snapshot should be performed only on primary");
}
if (indexShard.indexSettings().isSegRepEnabled() && indexShard.isPrimaryMode() == false) {
throw new IndexShardSnapshotFailedException(
shardId,
"snapshot triggered on a new primary following failover and cannot proceed until promotion is complete"
);
}
if (indexShard.routingEntry().relocating()) {
// do not snapshot when in the process of relocation of primaries so we won't get conflicts
throw new IndexShardSnapshotFailedException(shardId, "cannot snapshot while relocating");
Expand Down

0 comments on commit 892d78a

Please sign in to comment.