# No transactions means only a single

**URL:** <https://discuss.elastic.co/t/no-transactions-means-only-a-single/3689>\
**Category:** Elasticsearch\
**Created:** [December 22, 2010, 7:03pm UTC](https://discuss.elastic.co/t/no-transactions-means-only-a-single/3689 "2010-12-22T19:03:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![byuva](https://avatars.discourse-cdn.com/v4/letter/b/b5ac83/32.png) [@byuva](https://discuss.elastic.co/u/byuva)\
**Post date:** [December 22, 2010, 7:03pm UTC](https://discuss.elastic.co/t/no-transactions-means-only-a-single/3689/1 "2010-12-22T19:03:19Z")

</div>

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

---

<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:** [December 23, 2010, 4:30am UTC](https://discuss.elastic.co/t/no-transactions-means-only-a-single/3689/2 "2010-12-23T04:30:36Z")

</div>

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](mailto: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](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](http://Nabble.com).

---

<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, 4:14am UTC](https://discuss.elastic.co/t/no-transactions-means-only-a-single/3689/3 "2017-07-06T04:14:55Z")

</div>


