# Version Conflicts

**URL:** https://discuss.elastic.co/t/version-conflicts/7187
**Category:** Elasticsearch
**Created:** [March 31, 2012, 1:54am UTC](https://discuss.elastic.co/t/version-conflicts/7187 "2012-03-31T01:54:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Nathan\_Harkenrider](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_harkenrider/32/2935_2.png) [@Nathan\_Harkenrider](https://discuss.elastic.co/u/Nathan_Harkenrider)
#### Post date: [March 31, 2012, 1:54am UTC](https://discuss.elastic.co/t/version-conflicts/7187/1 "2012-03-31T01:54:54Z")

</div>

Hi,

I'm currently running three separate processes that are indexing data  
into ElasticSearch (0.18.6). The majority of these index operations  
are inserts, but there are occasional re-index operations for existing  
documents as well. We're currently encountering version conflict  
exceptions when executing some of these index operations.

The index operations are using a timestamp as a version number and  
setting version type to external. The exceptions seem to indicate that  
the existing version number is the same as the new version number.  
Given that we're using System.currentTimeMillis() to generate the  
version, this seems unlikely.

Index code: [https://gist.github.com/2258576](https://gist.github.com/2258576)

Stacktrace; [https://gist.github.com/2258568](https://gist.github.com/2258568)

Any thoughts on what might be going wrong?

Regards,

Nathan

---

<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: [March 31, 2012, 9:04pm UTC](https://discuss.elastic.co/t/version-conflicts/7187/2 "2012-03-31T21:04:44Z")

</div>

Thats whats get reported by elasticsearch, so this is what it has..., not  
that System.currentTimeInMillis resolution is not a millisecond, it varies  
depending on the OS.

On Sat, Mar 31, 2012 at 4:54 AM, Nathan Harkenrider \<  
[nathan.harkenrider@gmail.com](mailto:nathan.harkenrider@gmail.com)\> wrote:

> Hi,
> 
> I'm currently running three separate processes that are indexing data  
> into Elasticsearch (0.18.6). The majority of these index operations  
> are inserts, but there are occasional re-index operations for existing  
> documents as well. We're currently encountering version conflict  
> exceptions when executing some of these index operations.
> 
> The index operations are using a timestamp as a version number and  
> setting version type to external. The exceptions seem to indicate that  
> the existing version number is the same as the new version number.  
> Given that we're using System.currentTimeMillis() to generate the  
> version, this seems unlikely.
> 
> Index code: [Indexing code · GitHub](https://gist.github.com/2258576)
> 
> Stacktrace; [Version conflict stacktrace · GitHub](https://gist.github.com/2258568)
> 
> Any thoughts on what might be going wrong?
> 
> Regards,
> 
> Nathan

---

<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:34am UTC](https://discuss.elastic.co/t/version-conflicts/7187/3 "2017-07-06T03:34:02Z")

</div>


