-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
Milestone
Description
Queries such as r.table(t).filter(f).update(u) seem atomic because there is no error when the non_atomic flag is not set. However it is possible for u to be applied when f doesn't hold (see rethinkdb/docs#679 (comment))
A possible work-around is r.table(t).filter(f).update((row) -> r.branch(f(row), u(row), {}))
This is a proposal for adding support in the server for making entire queries or subqueries atomic, by either guaranteeing to the user that queries like this one are atomic or letting the user specify that they should be without needing to duplicate any logic into the update function.