Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
*Location*: http://docs.mongodb.org/manual/tutorial/perform-two-phase-commits/
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17
*Referrer*: http://www.mongodb.org/display/DOCS/two-phase+commit
*Screen Resolution*: 2560 x 1440
*Location*: http://docs.mongodb.org/manual/tutorial/perform-two-phase-commits/ *User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17 *Referrer*: http://www.mongodb.org/display/DOCS/two-phase+commit *Screen Resolution*: 2560 x 1440
Description
The "transaction" implemented in the doc is not isolated. The committing is a group of atomic operations, so is the rollback. So all the inconsistent inner states are visible to other applications.
What this implementation achieved is eventual consistency of multi documents update, but definitely not ACID.
Since other applications can touch those documents while this transaction is committing and rollbacking, for fully reversible (rollback), this implementation can only support $inc operator. Because other atomic operators ($set, $pull ...) are not reversible without exclusive lock for write.
Reporter: Chunpeng Huo
E-mail: huochunpeng@gmail.com![]()