Read-your-own-writes consistency in Mongodb

前端 未结 2 983
轻奢々
轻奢々 2021-02-20 15:13

first, here is what is said in Pymongo Documentation

By default, PyMongo starts a request for each thread when the thread first runs an operation on Mong

2条回答
  •  余生分开走
    2021-02-20 15:28

    I'm the author of Motor and I know a bit about AsyncMongo too. Here's Motor's documentation regarding safe writes:

    http://emptysquare.net/motor/pymongo/api/motor/differences.html#acknowledged-writes

    Short answer: Whatever code you execute in a callback to insert(), update(), etc., if those inserts or updates are safe, will see the data in MongoDB after the change has been applied. Any code you execute not in such a callback may run before or after MongoDB has applied the change.

提交回复
热议问题