-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Delete might returns false isFound() while primary is relocated #8706
Description
here is a link to a relevant failure: http://build-us-00.elasticsearch.org/job/es_core_master_metal/5665/
the test is indexing into a single shard with 0 replicas and this only shard is moving from node 0 to node 1. During the time we index the documents we mark the primary as started but until the clusterstate is published on node 0 it depends on which node you hit for indexing if the doc goes into both shards or not. Now if you hit node 1 the doc only goes into the new started (relocated) primary. Yet if you are fast enough and hit node 0 for the delete we can't find the doc in the currently relocating (clusterstate is not yet updated) - the logic knows it needs to push the delete into the new primary on node 1 so it really get's deleted but we return the response from node 0 which has isFound = false