[DOCS-2455] Clarify the "Isolate Sequence of Operations" doc Created: 24/Dec/13  Updated: 16/Mar/15  Resolved: 14/Nov/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: v1.3.11, v1.3.14

Type: Improvement Priority: Major - P3
Reporter: Richard Kreuter (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Participants:
Days since reply: 9 years, 13 weeks, 5 days ago

 Description   

The "Isolate Sequence of Operations" document is somewhat confusing. Specifically:

"Use the entire document as the query in the update() operation, to generalize the operation and guarantee that the original document was not modified, rather than ensuring that as single field was not changed."

This sentence is incorrect in general, specifying the entire document as the selector in update() will continue to match the document after new fields are added.

Solutions: (1) drop this recommendation, (2) add caveats to it, e.g., that using the entire document works if and only if all updaters only ever do in-place updates, but never add new fields and never cause field reordering, (3) much more complicated-ly, for each updater to specify $not $exists for any fields that other updaters might be adding (though this approach, while logically valid, would be insanely bad engineering).

Probably dropping the bullet would be best.

More generally this document is confusing: the preamble talks about multi-document isolation, but this pattern is about optimistic concurrency, not isolation.



 Comments   
Comment by Githook User [ 14/Nov/14 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-2455: some reorg of isolate sequence
Branch: master
https://github.com/mongodb/docs/commit/45c2c494d6fdeb8b4f281167f8bf8b765f9b9c51

Comment by Githook User [ 14/Nov/14 ]

Author:

{u'username': u'i80and', u'name': u'Andrew Aldridge', u'email': u'i80and@foxquill.com'}

Message: DOCS-2455: Split up the Isolate Sequence of Operations tutorial

Signed-off-by: kay <kay.kim@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/1bed44a63c6d5fd3a3b65fcc298fcdde7de11034

Generated at Thu Feb 08 07:43:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.