mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
Check that all active shards have their allocation id in the in-sync set
This commit is contained in:
parent
a4ea7e7223
commit
a74f77b632
@ -128,6 +128,11 @@ public class IndexRoutingTable extends AbstractDiffable<IndexRoutingTable> imple
|
|||||||
throw new IllegalStateException("shard routing has an index [" + shardRouting.index() + "] that is different " +
|
throw new IllegalStateException("shard routing has an index [" + shardRouting.index() + "] that is different " +
|
||||||
"from the routing table");
|
"from the routing table");
|
||||||
}
|
}
|
||||||
|
if (shardRouting.active() &&
|
||||||
|
indexMetaData.activeAllocationIds(shardRouting.id()).contains(shardRouting.allocationId().getId()) == false) {
|
||||||
|
throw new IllegalStateException("active shard routing " + shardRouting + " has no corresponding entry in the " +
|
||||||
|
"in-sync allocation set " + indexMetaData.activeAllocationIds(shardRouting.id()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user