# Consistency of distributed operations

**URL:** <https://discuss.elastic.co/t/consistency-of-distributed-operations/3434>\
**Category:** Elasticsearch\
**Created:** [October 12, 2010, 8:27am UTC](https://discuss.elastic.co/t/consistency-of-distributed-operations/3434 "2010-10-12T08:27:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [October 12, 2010, 8:27am UTC](https://discuss.elastic.co/t/consistency-of-distributed-operations/3434/1 "2010-10-12T08:27:42Z")

</div>

Hi,

can ES ensure consistency for distributed operations if the operation  
consists of more phases?  
For example if DFS\_QUERY\_THEN\_FETCH search type is used what happens if some  
relevant documents are deleted from index between first and second phase of  
the query?

Regards,  
Lukas

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [October 12, 2010, 8:46am UTC](https://discuss.elastic.co/t/consistency-of-distributed-operations/3434/2 "2010-10-12T08:46:22Z")

</div>

Hey,

Yes, elasticsearch ensures consistency of things changed between phases.  
Those changes will not suddenly be reflected if they "got in" between the  
phases. Low level wise, its done by maintaining the same IndexReader to use  
between phases.

-shay.banon

On Tue, Oct 12, 2010 at 10:27 AM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:

> Hi,
> 
> can ES ensure consistency for distributed operations if the operation  
> consists of more phases?  
> For example if DFS\_QUERY\_THEN\_FETCH search type is used what happens if  
> some relevant documents are deleted from index between first and second  
> phase of the query?
> 
> Regards,  
> Lukas

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:18am UTC](https://discuss.elastic.co/t/consistency-of-distributed-operations/3434/3 "2017-07-06T04:18:04Z")

</div>


