# Isolation levels

**URL:** <https://discuss.elastic.co/t/isolation-levels/152242>\
**Category:** Elasticsearch\
**Created:** [October 12, 2018, 12:56pm UTC](https://discuss.elastic.co/t/isolation-levels/152242 "2018-10-12T12:56:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacob\_Bogers](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@Jacob\_Bogers](https://discuss.elastic.co/u/Jacob_Bogers)\
**Post date:** [October 12, 2018, 12:56pm UTC](https://discuss.elastic.co/t/isolation-levels/152242/1 "2018-10-12T12:56:37Z")

</div>

hi,  
I am comming from the oracle database space and i have a question about "isolaton levels"

In order of low to highest degree of isolation

- READ UNCOMMITTED
- READ COMMITTED
- REPEATABLE READ
- SERIALIZABLE

Which one(s) (plural?) supported by elastic  
Regards

Jacob

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 12, 2018, 1:17pm UTC](https://discuss.elastic.co/t/isolation-levels/152242/2 "2018-10-12T13:17:56Z")

</div>

Elasticsearch does not support transactions, so I believe the answer is none.

---

<div class="post-metadata">

**Author:** ![Jacob\_Bogers](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@Jacob\_Bogers](https://discuss.elastic.co/u/Jacob_Bogers)\
**Post date:** [October 12, 2018, 1:49pm UTC](https://discuss.elastic.co/t/isolation-levels/152242/3 "2018-10-12T13:49:28Z")

</div>

Thank you for answer,  
One more question, so I can potentially read a partially changed document? at least document reads are atomic?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 12, 2018, 1:59pm UTC](https://discuss.elastic.co/t/isolation-levels/152242/4 "2018-10-12T13:59:54Z")

</div>

Yes, you will not get partially changed documents, but could get different version depending on which shard you query.

---

<div class="post-metadata">

**Author:** ![Jacob\_Bogers](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@Jacob\_Bogers](https://discuss.elastic.co/u/Jacob_Bogers)\
**Post date:** [October 12, 2018, 2:12pm UTC](https://discuss.elastic.co/t/isolation-levels/152242/5 "2018-10-12T14:12:35Z")

</div>

Great, aslong as the read is atomic (on document level) I am happy)).  
Is there an atomic "read and update"??

Example of what I want to do:  
Let say you want to decrease a balance (bankaccount maybe) but it should only happen if the balance will not go below zero. I am thinking of solving the problem in 2 ways

1. Can I create a mapping with a constraint (a type whos value must be \>= 0)
2. A way to do conditional update based on a read in one atomic action.

Cheers  
Jacob.

---

<div class="post-metadata">

**Author:** ![Jacob\_Bogers](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@Jacob\_Bogers](https://discuss.elastic.co/u/Jacob_Bogers)\
**Post date:** [October 12, 2018, 2:33pm UTC](https://discuss.elastic.co/t/isolation-levels/152242/6 "2018-10-12T14:33:54Z")

</div>

Oh sorry, I see that constraining the values of a float cannot be part of a "type" (or maybe it can?)

Regards  
Jacob

---

<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:** [November 9, 2018, 2:33pm UTC](https://discuss.elastic.co/t/isolation-levels/152242/7 "2018-11-09T14:33:54Z")

</div>

Closed on November 9, 2018, 2:33pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
