You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2016/09/09 12:35:17 UTC
documentation commit: updated refs/heads/master to ab57e34
Repository: couchdb-documentation
Updated Branches:
refs/heads/master 115e3ce45 -> ab57e34d3
remove references to all_or_nothing
refs COUCHDB-3120
Project: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/commit/ab57e34d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/tree/ab57e34d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/diff/ab57e34d
Branch: refs/heads/master
Commit: ab57e34d380f8ae6fdc28114fec733376324815a
Parents: 115e3ce
Author: Will Holley <wi...@gmail.com>
Authored: Wed Sep 7 18:58:03 2016 +0100
Committer: Will Holley <wi...@gmail.com>
Committed: Fri Sep 9 13:30:16 2016 +0100
----------------------------------------------------------------------
src/api/database/bulk-api.rst | 55 ++------------------------------------
src/json-structure.rst | 3 ---
src/replication/conflicts.rst | 45 -------------------------------
src/whatsnew/2.0.rst | 2 ++
4 files changed, 4 insertions(+), 101 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/ab57e34d/src/api/database/bulk-api.rst
----------------------------------------------------------------------
diff --git a/src/api/database/bulk-api.rst b/src/api/database/bulk-api.rst
index ef36ce7..ddbc579 100644
--- a/src/api/database/bulk-api.rst
+++ b/src/api/database/bulk-api.rst
@@ -217,9 +217,6 @@
:<header X-Couch-Full-Commit: Overrides server's
:config:option:`commit policy <couchdb/delayed_commits>`. Possible values
are: ``false`` and ``true``. *Optional*
- :<json boolean all_or_nothing: Sets the database commit mode to use
- :ref:`all-or-nothing <api/db/bulk_docs/semantics>` semantics.
- Default is ``false``. *Optional*
:<json array docs: List of documents objects
:<json boolean new_edits: If ``false``, prevents the database from
assigning them new revision IDs. Default is ``true``. *Optional*
@@ -232,8 +229,8 @@
:>jsonarr string reason: Error reason. *Optional*
:code 201: Document(s) have been created or updated
:code 400: The request provided invalid JSON data
- :code 417: Occurs when ``all_or_nothing`` option set as ``true`` and
- at least one document was rejected by :ref:`validation function <vdufun>`
+ :code 417: Occurs when at least one document was rejected by a
+ :ref:`validation function <vdufun>`
:code 500: Malformed data provided, while it's still valid JSON
**Request**:
@@ -505,54 +502,6 @@ of conflict checking performed on each document. The two modes are:
submit the document update, with the correct revision tag, to update
the document.
-- **all-or-nothing**
-
- In `all-or-nothing` mode, either all documents are written to the
- database, or no documents are written to the database, in the event
- of a system failure during commit.
-
- In addition, the per-document conflict checking is not performed.
- Instead a new revision of the document is created, even if the new
- revision is in conflict with the current revision in the database.
- The returned structure contains the list of documents with new
- revisions:
-
- .. code-block:: http
-
- HTTP/1.1 201 Created
- Cache-Control: must-revalidate
- Content-Length: 215
- Content-Type: application/json
- Date: Sat, 26 Oct 2013 00:13:33 GMT
- Server: CouchDB (Erlang OTP)
-
- [
- {
- "id": "FishStew",
- "ok": true,
- "rev": "1-6a466d5dfda05e613ba97bd737829d67"
- },
- {
- "id": "LambStew",
- "ok": true,
- "rev": "1-648f1b989d52b8e43f05aa877092cc7c"
- },
- {
- "id": "BeefStew",
- "ok": true,
- "rev": "1-e4602845fc4c99674f50b1d5a804fdfa"
- }
- ]
-
- When updating documents using this mode the revision of a document
- included in views will be arbitrary. You can check the conflict
- status for a document by using the ``conflicts=true`` query argument
- when accessing the view. Conflicts should be handled individually to
- ensure the consistency of your database.
-
- To use this mode, you must include the ``all_or_nothing`` field (set
- to true) within the main body of the JSON of the request.
-
The effects of different database operations on the different modes are
summarized below:
http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/ab57e34d/src/json-structure.rst
----------------------------------------------------------------------
diff --git a/src/json-structure.rst b/src/json-structure.rst
index bf84f61..9711ae9 100644
--- a/src/json-structure.rst
+++ b/src/json-structure.rst
@@ -53,9 +53,6 @@ Bulk Documents
+--------------------------------+---------------------------------------------+
| Field | Description |
+================================+=============================================+
-| all_or_nothing (optional) | Sets the database commit mode to use |
-| | all-or-nothing semantics |
-+--------------------------------+---------------------------------------------+
| docs [array] | Bulk Documents Document |
+--------------------------------+---------------------------------------------+
| _id (optional) | Document ID |
http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/ab57e34d/src/replication/conflicts.rst
----------------------------------------------------------------------
diff --git a/src/replication/conflicts.rst b/src/replication/conflicts.rst
index ef33a89..585dde2 100644
--- a/src/replication/conflicts.rst
+++ b/src/replication/conflicts.rst
@@ -144,51 +144,6 @@ So when working in this mode, your application still has to be able to handle
these conflicts and have a suitable retry strategy, but these conflicts never
end up inside the database itself.
-Conflicts in batches
-====================
-
-There are two different ways that conflicts can end up in the database:
-
-- Conflicting changes made on different databases, which are replicated to each
- other, as shown earlier.
-- Changes are written to the database using ``_bulk_docs`` and all_or_nothing,
- which bypasses the 409 mechanism.
-
-The :ref:`_bulk_docs API <api/db/bulk_docs>` lets you submit multiple updates
-(and/or deletes) in a single HTTP POST. Normally, these are treated as
-independent updates; some in the batch may fail because the `_rev` is stale
-(just like a 409 from a PUT) whilst others are written successfully.
-The response from ``_bulk_docs`` lists the success/fail separately for each
-document in the batch.
-
-However there is another mode of working, whereby you specify
-``{"all_or_nothing":true}`` as part of the request. This is CouchDB's nearest
-equivalent of a "transaction", but it's not the same as a database transaction
-which can fail and roll back. Rather, it means that all of the changes in the
-request will be forcibly applied to the database, even if that introduces
-conflicts.
-
-So this gives you a way to introduce conflicts within a single database
-instance. If you choose to do this instead of PUT, it means you don't have to
-write any code for the possibility of getting a 409 response, because you will
-never get one. Rather, you have to deal with conflicts appearing later in the
-database, which is what you'd have to do in a multi-master application anyway.
-
-.. code-block:: http
-
- POST /db/_bulk_docs HTTP/1.1
-
-.. code-block:: javascript
-
- {
- "all_or_nothing": true,
- "docs": [
- {"_id":"x", "_rev":"1-xxx", ...},
- {"_id":"y", "_rev":"1-yyy", ...},
- ...
- ]
- }
-
Revision tree
=============
http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/ab57e34d/src/whatsnew/2.0.rst
----------------------------------------------------------------------
diff --git a/src/whatsnew/2.0.rst b/src/whatsnew/2.0.rst
index 82144af..2a3ac0c 100644
--- a/src/whatsnew/2.0.rst
+++ b/src/whatsnew/2.0.rst
@@ -34,6 +34,8 @@ Upgrade Notes
* Note that the semantics of some API calls have changed due to the introduction
of the clustering feature. Specifically, make note of the difference between
receiving a `201` and a `202` when storing a document.
+* `all_or_nothing` is no longer supported by the :ref:`bulk_docs
+ <api/db/bulk_docs>` API
.. _release/2.0.0: