Delete API: Using refresh parameter might not refresh delete operation on replica, closes #1047.

This commit is contained in:
kimchy 2011-06-19 09:15:08 +03:00
parent 3e9dff8b7e
commit 5540fbf7ab

View File

@ -175,6 +175,8 @@ public class TransportDeleteAction extends TransportShardReplicationOperationAct
Engine.Delete delete = indexShard.prepareDelete(request.type(), request.id(), request.version())
.origin(Engine.Operation.Origin.REPLICA);
indexShard.delete(delete);
if (request.refresh()) {
try {
indexShard.refresh(new Engine.Refresh(false));
@ -183,7 +185,6 @@ public class TransportDeleteAction extends TransportShardReplicationOperationAct
}
}
indexShard.delete(delete);
}
@Override protected ShardIterator shards(ClusterState clusterState, DeleteRequest request) {