48 ms·
Did you see the part about "Operations in a transaction use the transaction-level read concern. That is, any read concern set at the collection and database lev
by logicchains 6y ago
Did you see the part about "Operations in a transaction use the transaction-level read concern. That is, any read concern set at the collection and database level is ignored inside the transaction."?
"Tansactions without an explicit read concern downgrade any requested read concern at the database or collection level to a default level of local, which offers “no guarantee that the data has been written to a majority of replicas (i.e. may be rolled back).”"
The big problem is that, even if somebody correctly sets the read and write concerns to something sensible, the moment they use a transaction these guarantees fly out the window, unless they read the docs carefully enough to realise they have to set the read and write concern for the transaction too. The defaults are very un-intuitive; I can't imagine that the case of somebody needing snapshot isolation in general but being fine with arbitrary data less in transactions is a common case, compared to wanting to avoid data loss both generally and in transactions.
- lmilcin 6y agoIt is different to complain about unclear documentation and unintuitive gurantees and to say that it just doesn't work. Yes it works. Yes, you have to read the documentation very carefully.
- inglor 6y agoNot saying you're wrong. As an anecdotal data point - we've read the docs (carefully) and spoke to MongoDB quite a bit when implementing transactions including their highest paid levels of support and still ran into this issue: > transactions running with the strongest isolation levels can exhibit G1c: cyclic information flow. As well as the Node.js API issue (I just checked randomly and their Python API has the same bug lol) listed above.
- afarrell 6y agoIt is not different. For a product like mongodb, both the durability guarantees and the documentation explaining them are an integral part of the user experience. If I'm starting a project, I'm making decisions for a junior developer whom I'll hire in 2 years. I care what code that junior developer will be most nudged to write. If the Stripe API had documentation was needlessly unclear in a way which led people to lose a significant amount of money, that would be a bug.