Version Conflicts


(Nathan Harkenrider) #1

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

Stacktrace; https://gist.github.com/2258568

Any thoughts on what might be going wrong?

Regards,

Nathan


(Shay Banon) #2

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> 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: https://gist.github.com/2258576

Stacktrace; https://gist.github.com/2258568

Any thoughts on what might be going wrong?

Regards,

Nathan


(system) #3