No transactions means only a single


(byuva) #1

I am still trying to unwrap my mind from the world of RDMS and learn how to work around some of the features "missing" (more like intentionally traded for other capabilities) from Lucene/ES. While I don't need elaborate transactions and rollbacks I am struggling with how to simply updated a record safely. It seems like there is a dangerous gap between when I get a record and when I put the modified version back into the index. Anyone else modifying the record in that time period would have their changes overwritten. Is the solution to only let one process ever be allowed to write to the index at one time?

-b


(Shay Banon) #2

Yes, this is a problem that you have to solve on your end. In the future, ES
might support something similar to optimistic locking throwing an exception
when trying to update a document with a stale version.

On Wed, Dec 22, 2010 at 9:03 PM, byuva brian@merrells.org wrote:

I am still trying to unwrap my mind from the world of RDMS and learn how to
work around some of the features "missing" (more like intentionally traded
for other capabilities) from Lucene/ES. While I don't need elaborate
transactions and rollbacks I am struggling with how to simply updated a
record safely. It seems like there is a dangerous gap between when I get a
record and when I put the modified version back into the index. Anyone
else
modifying the record in that time period would have their changes
overwritten. Is the solution to only let one process ever be allowed to
write to the index at one time?

-b

View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/No-transactions-means-only-a-single-tp2132950p2132950.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.


(system) #3