From 07067160fb96bc839a6c2bff170471aff622f06a Mon Sep 17 00:00:00 2001 From: kay Date: Mon, 5 Nov 2012 13:50:56 -0500 Subject: [PATCH 1/2] DOCS-617 expand slightly the Isolation section in write-operations --- draft/core/write-operations.txt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/draft/core/write-operations.txt b/draft/core/write-operations.txt index 591d5ef9a41..951799102c8 100644 --- a/draft/core/write-operations.txt +++ b/draft/core/write-operations.txt @@ -284,16 +284,18 @@ and :doc:`/applications/indexes`. Isolation --------- -All operations inside of a *single* MongoDB document are atomic. An -update operation may modify more than one sub-document within a single -MongoDB document (or record) in a single operation that will either -succeed or fail and cannot leave the document in an in-between state. +When a single write operation modifies multiple documents, the +operation as a whole is not atomic, but the modification of each +document is. The modification of a single Mongo document (or record) +remains atomic even if the write operation modifies more than one +sub-document *within* that document. No other operations are atomic; however, you can attempt to isolate a -sequence of write operations from other read and write operations to -prevent undesirable interactions. For more information see -:doc:`Isolated write operations ` and -:doc:`/tutorial/perform-two-phase-commits`. +write operation that affects multiple documents using the :doc:`$atomic +isolation operator `. + +To isolate a sequence of write operations from other read and write +operations, see :doc:`/tutorial/perform-two-phase-commits`. Architecture ------------ From 4459915a64a782f5987e25e79aabf7ad29478db4 Mon Sep 17 00:00:00 2001 From: kay Date: Mon, 5 Nov 2012 14:25:51 -0500 Subject: [PATCH 2/2] DOCS-617 edits --- draft/core/write-operations.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/draft/core/write-operations.txt b/draft/core/write-operations.txt index 951799102c8..3a32c9eec79 100644 --- a/draft/core/write-operations.txt +++ b/draft/core/write-operations.txt @@ -285,14 +285,14 @@ Isolation --------- When a single write operation modifies multiple documents, the -operation as a whole is not atomic, but the modification of each -document is. The modification of a single Mongo document (or record) -remains atomic even if the write operation modifies more than one -sub-document *within* that document. +operation as a whole is not atomic, and other operations may +interleave. The modification of a single document, or record, is always +atomic, even if the write operation modifies multiple sub-document +*within* the single record. No other operations are atomic; however, you can attempt to isolate a -write operation that affects multiple documents using the :doc:`$atomic -isolation operator `. +write operation that affects multiple documents using the +:doc:`isolation operator `. To isolate a sequence of write operations from other read and write operations, see :doc:`/tutorial/perform-two-phase-commits`.