Distributed counters via scripting

Hi there,

I'm trying to find out information about how this works at a lower level.

Things like Cassandra have taken a great deal of effort to create
distributed counters, and I don't see any mention of how concurrent writes
are handled etc.

I would like to know how this performs under load, under a node being down,
and under concurrent write scenarios:

ctx._source['counter'] += 1;

--

If you are referring to incrementing counter using Update APIhttp://www.elasticsearch.org/guide/reference/api/update.html it
really depends on the amount of load. The operation is done on the primary
shard without any locks, so under heavy load, I supposed, you might
experience a significant number of retries. When node with primary shard
goes down, the primary status is immediately reassigned to one of replicas,
so the operation will just move to another node.

On Tuesday, January 22, 2013 7:37:30 PM UTC-5, Drew Broadley wrote:

Hi there,

I'm trying to find out information about how this works at a lower level.

Things like Cassandra have taken a great deal of effort to create
distributed counters, and I don't see any mention of how concurrent writes
are handled etc.

I would like to know how this performs under load, under a node being
down, and under concurrent write scenarios:

ctx._source['counter'] += 1;

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.