# Problem with realtime GET

**URL:** <https://discuss.elastic.co/t/problem-with-realtime-get/5393>\
**Category:** Elasticsearch\
**Created:** [September 16, 2011, 9:31am UTC](https://discuss.elastic.co/t/problem-with-realtime-get/5393 "2011-09-16T09:31:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pavel\_Penchev](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Pavel\_Penchev](https://discuss.elastic.co/u/Pavel_Penchev)\
**Post date:** [September 16, 2011, 9:31am UTC](https://discuss.elastic.co/t/problem-with-realtime-get/5393/1 "2011-09-16T09:31:34Z")

</div>

Hi,

I'm facing a problem with the ES realtime GET feature. I'm working on a  
project where I need to guarantee that once a document is index, all  
subsequent reads will find it.

I've created a small test that runs 50 threads and each thread writes a  
document and then immediately reads it. The test works ok on a single  
node setup but sometimes fails to find the document  
on a 2 node setup (approximately 8 times in 100 000 executions). The  
failed documents are actually indexed, a manual check finds them

A gist of the main class can be found here -  
[https://gist.github.com/1221648](https://gist.github.com/1221648). That class is all you need to run the  
test, for convenience a maven project is available on demand.

Any ideas, am I missing a setting?

Thanks in advance,  
Pavel

---

<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:** [September 18, 2011, 10:45am UTC](https://discuss.elastic.co/t/problem-with-realtime-get/5393/2 "2011-09-18T10:45:32Z")

</div>

Hey, thanks for the recreation. Managed to recreate it as well here, opened  
an issue and fixed it in 0.17 and master branch:  
[Realtime Get: Under high concurrent indexing and immediate get, a get might be missed while flushing · Issue #1344 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1344).

On Fri, Sep 16, 2011 at 12:31 PM, Pavel Penchev [pavel.penchev@gmail.com](mailto:pavel.penchev@gmail.com)wrote:

> Hi,
> 
> I'm facing a problem with the ES realtime GET feature. I'm working on a  
> project where I need to guarantee that once a document is index, all  
> subsequent reads will find it.
> 
> I've created a small test that runs 50 threads and each thread writes a  
> document and then immediately reads it. The test works ok on a single node  
> setup but sometimes fails to find the document  
> on a 2 node setup (approximately 8 times in 100 000 executions). The failed  
> documents are actually indexed, a manual check finds them
> 
> A gist of the main class can be found here -  
> [ES problem with realtime get · GitHub](https://gist.github.com/1221648). That class is all you need to run the  
> test, for convenience a maven project is available on demand.
> 
> Any ideas, am I missing a setting?
> 
> Thanks in advance,  
> Pavel

---

<div class="post-metadata">

**Author:** ![Pavel\_Penchev](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Pavel\_Penchev](https://discuss.elastic.co/u/Pavel_Penchev)\
**Post date:** [September 19, 2011, 7:08am UTC](https://discuss.elastic.co/t/problem-with-realtime-get/5393/3 "2011-09-19T07:08:43Z")

</div>

Superb!

Many thanks,  
Pavel

On 18.09.2011 13:45, Shay Banon wrote:

> Hey, thanks for the recreation. Managed to recreate it as well here,  
> opened an issue and fixed it in 0.17 and master branch:  
> [Realtime Get: Under high concurrent indexing and immediate get, a get might be missed while flushing · Issue #1344 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1344).
> 
> On Fri, Sep 16, 2011 at 12:31 PM, Pavel Penchev  
> \<[pavel.penchev@gmail.com](mailto:pavel.penchev@gmail.com) [mailto:pavel.penchev@gmail.com](mailto:pavel.penchev@gmail.com)\> wrote:
> 
> ```
> Hi,
> 
> I'm facing a problem with the ES realtime GET feature. I'm working
> on a project where I need to guarantee that once a document is
> index, all subsequent reads will find it.
> 
> I've created a small test that runs 50 threads and each thread
> writes a document and then immediately reads it. The test works ok
> on a single node setup but sometimes fails to find the document
> on a 2 node setup (approximately 8 times in 100 000 executions).
> The failed documents are actually indexed, a manual check finds them
> 
> A gist of the main class can be found here -
> https://gist.github.com/1221648. That class is all you need to run
> the test, for convenience a maven project is available on demand.
> 
> Any ideas, am I missing a setting?
> 
> Thanks in advance,
> Pavel
> 
> ```

---

<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, 3:54am UTC](https://discuss.elastic.co/t/problem-with-realtime-get/5393/4 "2017-07-06T03:54:10Z")

</div>


