# Concurrent modification Exception: tried to update version 2, found previous version 3

**URL:** <https://community.dremio.com/t/concurrent-modification-exception-tried-to-update-version-2-found-previous-version-3/2587>\
**Category:** Uncategorized\
**Created:** [January 22, 2019, 7:09am UTC](https://community.dremio.com/t/concurrent-modification-exception-tried-to-update-version-2-found-previous-version-3/2587 "2019-01-22T07:09:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhaynie](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/jhaynie/32/1131_2.png) [@jhaynie](https://community.dremio.com/u/jhaynie)\
**Post date:** [January 22, 2019, 7:09am UTC](https://community.dremio.com/t/concurrent-modification-exception-tried-to-update-version-2-found-previous-version-3/2587/1 "2019-01-22T07:09:54Z")

</div>

Running a query I’m getting the following error:

ConcurrentModificationException: tried to update version 2, found previous version 3

[26611e5c-b2fc-4b40-912d-be3692f2aa0c.zip](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/1/1f4e9997e72dd3718fe025942de921e6b7980746.zip) (48.1 KB)

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [January 22, 2019, 2:23pm UTC](https://community.dremio.com/t/concurrent-modification-exception-tried-to-update-version-2-found-previous-version-3/2587/2 "2019-01-22T14:23:39Z")

</div>

Hi @jhaynie

Did this start happening after an upgrade? Are you trying to query of a VDS?

Thanks  
@balaji.ramaswamy

---

<div class="post-metadata">

**Author:** ![jhaynie](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/jhaynie/32/1131_2.png) [@jhaynie](https://community.dremio.com/u/jhaynie)\
**Post date:** [January 22, 2019, 3:54pm UTC](https://community.dremio.com/t/concurrent-modification-exception-tried-to-update-version-2-found-previous-version-3/2587/3 "2019-01-22T15:54:59Z")

</div>

No upgrade. Using latest. This is a VDS query. It seems intermittent.

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [January 22, 2019, 5:18pm UTC](https://community.dremio.com/t/concurrent-modification-exception-tried-to-update-version-2-found-previous-version-3/2587/4 "2019-01-22T17:18:02Z")

</div>

Hi @jhaynie

Try to Edit the VDS, press space at the end of the SQL. Then Save. Retry the VDS

Thanks  
@balaji.ramaswamy

---

<div class="post-metadata">

**Author:** ![jhaynie](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/jhaynie/32/1131_2.png) [@jhaynie](https://community.dremio.com/u/jhaynie)\
**Post date:** [January 22, 2019, 7:33pm UTC](https://community.dremio.com/t/concurrent-modification-exception-tried-to-update-version-2-found-previous-version-3/2587/5 "2019-01-22T19:33:48Z")

</div>

I’ve add a space at the end of the query in our driver so all queries (including VDS creation) will have it. Will monitor it since it doesn’t happen on each time.

---

<div class="post-metadata">

**Author:** ![KrishnaPG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/krishnapg/32/3388_2.png) [@KrishnaPG](https://community.dremio.com/u/KrishnaPG)\
**Post date:** [February 17, 2023, 6:37am UTC](https://community.dremio.com/t/concurrent-modification-exception-tried-to-update-version-2-found-previous-version-3/2587/6 "2023-02-17T06:37:37Z")

</div>

@jhaynie Has the issue been fixed? Encountering similar error intermittently and wondering if you were able to resolve it with the “space at the end of the SQL” suggestion

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [February 28, 2023, 12:24am UTC](https://community.dremio.com/t/concurrent-modification-exception-tried-to-update-version-2-found-previous-version-3/2587/7 "2023-02-28T00:24:10Z")

</div>

@KrishnaPG Starting from Dremio 21.x, there is VDS ownership feature, you no longer have to edit and save, instead grant ownership to a user or role

[https://docs.dremio.com/software/sql-reference/sql-commands/rbac/](https://docs.dremio.com/software/sql-reference/sql-commands/rbac/)
