You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by fl...@apache.org on 2017/12/08 15:30:42 UTC
[couchdb-documentation] 01/02: Re-write the bulk doc transaction
description to reflect a single mode of operation
This is an automated email from the ASF dual-hosted git repository.
flimzy pushed a commit to branch bulkTxn
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git
commit bf33f911685eb2699e6922aeda94004cfe3d14d7
Author: Jonathan Hall <fl...@flimzy.com>
AuthorDate: Wed Nov 29 14:18:41 2017 +0100
Re-write the bulk doc transaction description to reflect a single mode of operation
---
src/api/database/bulk-api.rst | 39 +++++++++++++++------------------------
1 file changed, 15 insertions(+), 24 deletions(-)
diff --git a/src/api/database/bulk-api.rst b/src/api/database/bulk-api.rst
index c794f14..04152a8 100644
--- a/src/api/database/bulk-api.rst
+++ b/src/api/database/bulk-api.rst
@@ -322,10 +322,10 @@ documents created, here with the combination and their revision IDs:
}
]
-The content and structure of the returned JSON will depend on the transaction
-semantics being used for the bulk update; see :ref:`api/db/bulk_docs/semantics`
-for more information. Conflicts and validation errors when updating documents
-in bulk must be handled separately; see :ref:`api/db/bulk_docs/validation`.
+For details of the semantic content and structure of the returned JSON see
+:ref:`api/db/bulk_docs/semantics`. Conflicts and validation errors when
+updating documents in bulk must be handled separately; see
+:ref:`api/db/bulk_docs/validation`.
Updating Documents in Bulk
==========================
@@ -418,24 +418,16 @@ in bulk must be handled separately; see :ref:`api/db/bulk_docs/validation`.
Bulk Documents Transaction Semantics
====================================
-CouchDB supports two different modes for updating (or inserting)
-documents using the bulk documentation system. Each mode affects both
-the state of the documents in the event of system failure, and the level
-of conflict checking performed on each document. The two modes are:
-
-- **non-atomic**
-
- The default mode is `non-atomic`, that is, CouchDB will only guarantee
- that some of the documents will be saved when you send the request.
- The response will contain the list of documents successfully inserted
- or updated during the process. In the event of a crash, some of the
- documents may have been successfully saved, and some will have been
- lost.
+Bulk document operations are **non-atomic**. This means that CouchDB does not
+guarantee that documents included in a bulk update (or insert), will be saved
+when you send the request. The response will contain the list of documents
+successfully inserted or updated during the process. In the event of a crash,
+some of the documents may have been successfully saved, while others lost.
- In this mode, the response structure will indicate whether the
- document was updated by supplying the new ``_rev`` parameter
- indicating a new document revision was created. If the update failed,
- then you will get an ``error`` of type ``conflict``. For example:
+The response structure will indicate whether the document was updated by
+supplying the new ``_rev`` parameter indicating a new document revision was
+created. If the update failed, you will get an ``error`` of type ``conflict``.
+For example:
.. code-block:: javascript
@@ -457,9 +449,8 @@ of conflict checking performed on each document. The two modes are:
}
]
- In this case no new revision has been created and you will need to
- submit the document update, with the correct revision tag, to update
- the document.
+In this case no new revision has been created and you will need to submit the
+document update, with the correct revision tag, to update the document.
Replication of documents is independent of the type of insert or update.
The documents and revisions created during a bulk insert or update are
--
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.