diff --git a/source/core/write-operations-introduction.txt b/source/core/write-operations-introduction.txt index 64ae175788e..b35ffd56512 100644 --- a/source/core/write-operations-introduction.txt +++ b/source/core/write-operations-introduction.txt @@ -97,6 +97,10 @@ determine which documents to update as well as an options document that affects its behavior, such as the ``multi`` option to update multiple documents. +Operations performed by an update are atomic within a single document. For +example, you can safely use the :update:`$inc` and :update:`$mul` operators to +modify frequently-changed fields in concurrent applications. + The following diagram highlights the components of a MongoDB update operation: diff --git a/source/reference/operator/update/inc.txt b/source/reference/operator/update/inc.txt index 8bc9b691254..40555dddd3d 100644 --- a/source/reference/operator/update/inc.txt +++ b/source/reference/operator/update/inc.txt @@ -29,6 +29,8 @@ the field to the specified value. Use of the :update:`$inc` operator on a field with a null value will generate an error. +:update:`$inc` is an atomic operation within a single document. + Example ------- diff --git a/source/reference/operator/update/mul.txt b/source/reference/operator/update/mul.txt index 678bb29714d..2927cef4bd8 100644 --- a/source/reference/operator/update/mul.txt +++ b/source/reference/operator/update/mul.txt @@ -34,6 +34,8 @@ Multiplication with values of mixed numeric types (32-bit integer, :ref:`Multiplication Type Conversion Rules ` for details. +:update:`$mul` is an atomic operation within a single document. + Examples --------