mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-09 06:25:07 +00:00
Adapt local checkpoint assertion
With async durability, it does not hold true anymore after #43205. This is fine.
This commit is contained in:
parent
5f8db95d60
commit
8c856d6d91
@ -2198,7 +2198,7 @@ public class IndexShard extends AbstractIndexShardComponent implements IndicesCl
|
|||||||
"only primary relocation target can update allocation IDs from primary context: " + shardRouting;
|
"only primary relocation target can update allocation IDs from primary context: " + shardRouting;
|
||||||
assert primaryContext.getCheckpointStates().containsKey(routingEntry().allocationId().getId()) &&
|
assert primaryContext.getCheckpointStates().containsKey(routingEntry().allocationId().getId()) &&
|
||||||
getLocalCheckpoint() == primaryContext.getCheckpointStates().get(routingEntry().allocationId().getId())
|
getLocalCheckpoint() == primaryContext.getCheckpointStates().get(routingEntry().allocationId().getId())
|
||||||
.getLocalCheckpoint();
|
.getLocalCheckpoint() || indexSettings().getTranslogDurability() == Translog.Durability.ASYNC;
|
||||||
synchronized (mutex) {
|
synchronized (mutex) {
|
||||||
replicationTracker.activateWithPrimaryContext(primaryContext); // make changes to primaryMode flag only under mutex
|
replicationTracker.activateWithPrimaryContext(primaryContext); // make changes to primaryMode flag only under mutex
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user