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");
        }
```
This commit is contained in:
Boaz Leskes 2015-12-10 16:04:47 +01:00
parent fafeb3abdd
commit 09053f5c87
1 changed files with 0 additions and 3 deletions

View File

@ -506,9 +506,6 @@ public class IndexShard extends AbstractIndexShardComponent {
} }
public Engine.Delete prepareDeleteOnReplica(String type, String id, long version, VersionType versionType) { public Engine.Delete prepareDeleteOnReplica(String type, String id, long version, VersionType versionType) {
if (shardRouting.primary() && shardRouting.isRelocationTarget() == false) {
throw new IllegalIndexShardStateException(shardId, state, "shard is not a replica");
}
final DocumentMapper documentMapper = docMapper(type).getDocumentMapper(); final DocumentMapper documentMapper = docMapper(type).getDocumentMapper();
return prepareDelete(type, id, documentMapper.uidMapper().term(Uid.createUid(type, id)), version, versionType, Engine.Operation.Origin.REPLICA); return prepareDelete(type, id, documentMapper.uidMapper().term(Uid.createUid(type, id)), version, versionType, Engine.Operation.Origin.REPLICA);
} }