You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current implementation is really badly implemented as it is based on code which assumes transactions. For MongoEngine (and MongoDB) this is of course not true, so some improvements to operations should be done to implement them through atomic operations. And not through current fetch-update-save cycle.
Even worse is for subresources (lists), especially because we use indexes so things could move around and something would not be anymore on its place. You want to delete n-th element, but that element could be already something else at the time it is processed. Maybe we should introduce some dummy UUID/PKs to make sure we know what we are operating on. Operations on subresources should be really implemented through MongoEngine/MongoDB atomic operations on list and not changing list in the code.
The text was updated successfully, but these errors were encountered:
Current implementation is really badly implemented as it is based on code which assumes transactions. For MongoEngine (and MongoDB) this is of course not true, so some improvements to operations should be done to implement them through atomic operations. And not through current fetch-update-save cycle.
Even worse is for subresources (lists), especially because we use indexes so things could move around and something would not be anymore on its place. You want to delete n-th element, but that element could be already something else at the time it is processed. Maybe we should introduce some dummy UUID/PKs to make sure we know what we are operating on. Operations on subresources should be really implemented through MongoEngine/MongoDB atomic operations on list and not changing list in the code.
The text was updated successfully, but these errors were encountered: