# Multiple bulk actions on the same document

**URL:** <https://discuss.elastic.co/t/multiple-bulk-actions-on-the-same-document/230233>\
**Category:** Elasticsearch\
**Created:** [April 28, 2020, 6:20pm UTC](https://discuss.elastic.co/t/multiple-bulk-actions-on-the-same-document/230233 "2020-04-28T18:20:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Faiz\_Ahmed\_Mushtak\_H](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/faiz_ahmed_mushtak_h/32/47387_2.png) [@Faiz\_Ahmed\_Mushtak\_H](https://discuss.elastic.co/u/Faiz_Ahmed_Mushtak_H)\
**Post date:** [April 28, 2020, 6:20pm UTC](https://discuss.elastic.co/t/multiple-bulk-actions-on-the-same-document/230233/1 "2020-04-28T18:20:19Z")

</div>

Is it possible for multiple update actions in one bulk request on the same document to cause version conflict? that is to say, bulk actions are executed in parallel, so it is possible to face version conflict in that case right?

---

<div class="post-metadata">

**Author:** ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)\
**Post date:** [April 29, 2020, 9:50am UTC](https://discuss.elastic.co/t/multiple-bulk-actions-on-the-same-document/230233/2 "2020-04-29T09:50:01Z")

</div>

To my knowledge, update actions on the same document from one single bulk request should be grouped into a sub-request that gets sent to the shard for that document and exectured in order there, so there shouldn't be any parallel execution in that case.  
If you have multiple bulk requests "in flight" containing updates to the same document, thats a different story though.

---

<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:** [April 29, 2020, 1:22pm UTC](https://discuss.elastic.co/t/multiple-bulk-actions-on-the-same-document/230233/3 "2020-04-29T13:22:47Z")

</div>

Please be aware that this pattern of frequent updates of the same document can lead to a lot of small segments and performance problems. It would be better to merge updates by document before sending bulk.

---

<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:** [May 27, 2020, 1:22pm UTC](https://discuss.elastic.co/t/multiple-bulk-actions-on-the-same-document/230233/4 "2020-05-27T13:22:48Z")

</div>

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