# ES Transactions

**URL:** <https://discuss.elastic.co/t/es-transactions/334093>\
**Category:** Elasticsearch\
**Created:** [May 23, 2023, 9:23am UTC](https://discuss.elastic.co/t/es-transactions/334093 "2023-05-23T09:23:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sajeeda](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@sajeeda](https://discuss.elastic.co/u/sajeeda)\
**Post date:** [May 23, 2023, 9:23am UTC](https://discuss.elastic.co/t/es-transactions/334093/1 "2023-05-23T09:23:51Z")

</div>

Hi All,

I am trying to do an partial update on the document for 7 different process. i have been getting version control conflict. Is there a way where ES supports transactions so that there is no data loss. I do not want to proceed with conflicts setting in index and tried with retry\_on\_conflicts as well. Wanted to understand is there is better way of handing this where ES handles this case without loss of data.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 23, 2023, 10:09am UTC](https://discuss.elastic.co/t/es-transactions/334093/2 "2023-05-23T10:09:02Z")

</div>

What's wrong with `retry_on_conflicts`?

---

<div class="post-metadata">

**Author:** ![sajeeda](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@sajeeda](https://discuss.elastic.co/u/sajeeda)\
**Post date:** [May 23, 2023, 10:28am UTC](https://discuss.elastic.co/t/es-transactions/334093/3 "2023-05-23T10:28:31Z")

</div>

Thanks for the response. Nothing wrong with retry\_on\_conflicts, its just that when there is failure with next retry also then the update fails and leads to data loss. Want to avoid this so is there any other way to do this which ensures the update without any conflict.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 23, 2023, 1:12pm UTC](https://discuss.elastic.co/t/es-transactions/334093/4 "2023-05-23T13:12:31Z")

</div>

I think you need to catch this in your code and manage the error.

You could also use a Kafka queue in the middle so you can guarantee somehow the execution order of the changes but that will make your architecture a bit more complex I guess.

---

<div class="post-metadata">

**Author:** ![sajeeda](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@sajeeda](https://discuss.elastic.co/u/sajeeda)\
**Post date:** [May 23, 2023, 1:53pm UTC](https://discuss.elastic.co/t/es-transactions/334093/5 "2023-05-23T13:53:03Z")

</div>

Thank you for the response. So this means ES does not have the concept of transactions ? I did try to find documentation for this but could not find. Could you please share the document like where it says no support of transactions. So the I could understand better. Document like would be really helpful.

---

<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:** [May 23, 2023, 1:57pm UTC](https://discuss.elastic.co/t/es-transactions/334093/6 "2023-05-23T13:57:51Z")

</div>

> [@sajeeda](#):
>
> So this means ES does not have the concept of transactions ? I did try to find documentation for this but could not find.

Correct. Elasticsearch does not have support for transactions.

> [@sajeeda](#):
>
> Could you please share the document like where it says no support of transactions.

There is none as far as I know. Why would there be documentation around which features are NOT supported?

It seems a simple Google search finds several articles that describe that transactions are not supported and suggests ways around this.

---

<div class="post-metadata">

**Author:** ![sajeeda](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@sajeeda](https://discuss.elastic.co/u/sajeeda)\
**Post date:** [May 23, 2023, 2:10pm UTC](https://discuss.elastic.co/t/es-transactions/334093/7 "2023-05-23T14:10:16Z")

</div>

Thank you for the response.

---

<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:** [June 20, 2023, 2:10pm UTC](https://discuss.elastic.co/t/es-transactions/334093/8 "2023-06-20T14:10:53Z")

</div>

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