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
I think this is done like this because back in MongoDB 3, there wasn't support for transactions, so something always needed to be written first, and ops were chosen.
There's a bit of a writeup on the behaviour in the README.
If you're talking about an implementation that you're doing yourself, there's no reason why not, so long as you ensure that you have some way to ensure the op being written is "canonical", and that you don't have conflicting snapshot writes.
As I mentioned above, a new implementation might use MongoDB transactions, although this may not be as performant; there's some (light) discussion on the topic in #127
Why write the op before snapshot, is there any consideration?
sharedb-mongo/index.js
Lines 239 to 254 in 9e88c28
The text was updated successfully, but these errors were encountered: