Skip to content

Commit 09053f5

Browse files
committed
remove safety check from IndexShard#prepareDeleteOnReplica
we are not ready for this yet: ``` if (shardRouting.primary() && shardRouting.isRelocationTarget() == false) { throw new IllegalIndexShardStateException(shardId, state, "shard is not a replica"); } ```
1 parent fafeb3a commit 09053f5

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

core/src/main/java/org/elasticsearch/index/shard/IndexShard.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -506,9 +506,6 @@ public Engine.Delete prepareDeleteOnPrimary(String type, String id, long version
506506
}
507507

508508
public Engine.Delete prepareDeleteOnReplica(String type, String id, long version, VersionType versionType) {
509-
if (shardRouting.primary() && shardRouting.isRelocationTarget() == false) {
510-
throw new IllegalIndexShardStateException(shardId, state, "shard is not a replica");
511-
}
512509
final DocumentMapper documentMapper = docMapper(type).getDocumentMapper();
513510
return prepareDelete(type, id, documentMapper.uidMapper().term(Uid.createUid(type, id)), version, versionType, Engine.Operation.Origin.REPLICA);
514511
}

0 commit comments

Comments
 (0)