You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2019/09/26 17:55:23 UTC
[couchdb-documentation] 01/01: Remove delayed commits
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch update-doc-to-remove-delayed-commits
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git
commit 056a651713529df7ecd2cd1fecc75a37adb97de1
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Thu Sep 26 13:43:33 2019 -0400
Remove delayed commits
Issue: https://github.com/apache/couchdb/issues/2165
The code was removed on master for 3.0 in https://github.com/apache/couchdb/pull/2208
---
src/api/database/bulk-api.rst | 4 +---
src/api/database/common.rst | 6 ------
src/api/database/compact.rst | 16 +++++++---------
src/api/document/attachments.rst | 7 +------
src/api/document/common.rst | 10 +---------
src/api/server/configuration.rst | 1 -
src/config/couchdb.rst | 28 ----------------------------
src/maintenance/performance.rst | 10 ----------
8 files changed, 10 insertions(+), 72 deletions(-)
diff --git a/src/api/database/bulk-api.rst b/src/api/database/bulk-api.rst
index 7729f90..5e7be62 100644
--- a/src/api/database/bulk-api.rst
+++ b/src/api/database/bulk-api.rst
@@ -631,9 +631,7 @@ Sending multiple queries to a database
:<header Accept: - :mimetype:`application/json`
- :mimetype:`text/plain`
:<header Content-Type: :mimetype:`application/json`
- :<header X-Couch-Full-Commit: Overrides server's
- :config:option:`commit policy <couchdb/delayed_commits>`. Possible values
- are: ``false`` and ``true``. *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*
diff --git a/src/api/database/common.rst b/src/api/database/common.rst
index 0f4f7b9..4831ab7 100644
--- a/src/api/database/common.rst
+++ b/src/api/database/common.rst
@@ -312,9 +312,6 @@
:<header Accept: - :mimetype:`application/json`
- :mimetype:`text/plain`
:<header Content-Type: :mimetype:`application/json`
- :<header X-Couch-Full-Commit: Overrides server's
- :config:option:`commit policy <couchdb/delayed_commits>`. Possible values
- are: ``false`` and ``true``. *Optional*.
:query string batch: Stores document in :ref:`batch mode
<api/doc/batch-writes>` Possible values: ``ok``. *Optional*
@@ -428,9 +425,6 @@ To use batch mode, append the ``batch=ok`` query argument to the URL of a
CouchDB server will respond with an HTTP :statuscode:`202` response code
immediately.
-Documents in the batch may be manually flushed by using the
-:post:`/{db}/_ensure_full_commit` endpoint.
-
.. note::
Creating or updating documents with batch mode doesn't guarantee that all
documents will be successfully stored on disk. For example, individual
diff --git a/src/api/database/compact.rst b/src/api/database/compact.rst
index 2253dc9..4aa8811 100644
--- a/src/api/database/compact.rst
+++ b/src/api/database/compact.rst
@@ -146,15 +146,13 @@
===========================
.. http:post:: /{db}/_ensure_full_commit
- :synopsis: Makes sure all uncommitted changes are written and synchronized
- to the disk
-
- Commits any recent changes to the specified database to disk. You should
- call this if you want to ensure that recent changes have been flushed.
- This function is likely not required, assuming you have the recommended
- configuration setting of ``delayed_commits=false``, which requires CouchDB
- to ensure changes are written to disk before a 200 or similar result is
- returned.
+ :synopsis: Deprecated endpoint to support CouchDB versions < 3.0
+ replicators.
+
+ Before 3.0 this was used to commit recent changes to the database in case
+ the ``delayed_commits=true`` option was set. That option is always
+ ``false`` now, so commits are never delayed. However, this endpoint is kept
+ for compatibility with older replicators.
:param db: Database name
:<header Accept: - :mimetype:`application/json`
diff --git a/src/api/document/attachments.rst b/src/api/document/attachments.rst
index 5f7af11..fc49e5f 100644
--- a/src/api/document/attachments.rst
+++ b/src/api/document/attachments.rst
@@ -133,9 +133,6 @@
:<header Content-Type: Attachment MIME type. *Required*
:<header If-Match: Document revision. Alternative to `rev` query parameter
- :<header X-Couch-Full-Commit: Overrides server's
- :config:option:`commit policy <couchdb/delayed_commits>`. Possible values
- are: ``false`` and ``true``. *Optional*
:query string rev: Document revision. *Optional*
@@ -203,9 +200,7 @@
:<header Accept: - :mimetype:`application/json`
- :mimetype:`text/plain`
:<header If-Match: Document revision. Alternative to `rev` query parameter
- :<header X-Couch-Full-Commit: Overrides server's
- :config:option:`commit policy <couchdb/delayed_commits>`. Possible values
- are: ``false`` and ``true``. *Optional*
+
:query string rev: Document revision. *Required*
:query string batch: Store changes in :ref:`batch mode
<api/doc/batch-writes>` Possible values: ``ok``. *Optional*
diff --git a/src/api/document/common.rst b/src/api/document/common.rst
index 9a806a3..ef0af81 100644
--- a/src/api/document/common.rst
+++ b/src/api/document/common.rst
@@ -189,9 +189,6 @@
- :mimetype:`multipart/related`
:<header If-Match: Document's revision. Alternative to `rev` query
parameter or document key. *Optional*
- :<header X-Couch-Full-Commit: Overrides server's
- :config:option:`commit policy <couchdb/delayed_commits>`. Possible values
- are: ``false`` and ``true``. *Optional*
:query string rev: Document's revision if updating an existing document.
Alternative to `If-Match` header or document key. *Optional*
@@ -284,9 +281,7 @@
- :mimetype:`text/plain`
:<header If-Match: Document's revision. Alternative to `rev` query
parameter
- :<header X-Couch-Full-Commit: Overrides server's
- :config:option:`commit policy <couchdb/delayed_commits>`. Possible values
- are: ``false`` and ``true``. *Optional*
+
:query string rev: Actual document's revision
:query string batch: Stores document in :ref:`batch mode
<api/doc/batch-writes>` Possible values: ``ok``. *Optional*
@@ -362,9 +357,6 @@
<copy_to_existing_document>`.
:<header If-Match: Source document's revision. Alternative to `rev` query
parameter
- :<header X-Couch-Full-Commit: Overrides server's
- :config:option:`commit policy <couchdb/delayed_commits>`. Possible values
- are: ``false`` and ``true``. *Optional*
:query string rev: Revision to copy from. *Optional*
:query string batch: Stores document in :ref:`batch mode
<api/doc/batch-writes>` Possible values: ``ok``. *Optional*
diff --git a/src/api/server/configuration.rst b/src/api/server/configuration.rst
index 6bc0586..77e7d03 100644
--- a/src/api/server/configuration.rst
+++ b/src/api/server/configuration.rst
@@ -70,7 +70,6 @@ interact with the local node's configuration.
"couchdb": {
"users_db_suffix": "_users",
"database_dir": "/var/lib/couchdb",
- "delayed_commits": "true",
"max_attachment_chunk_size": "4294967296",
"max_dbs_open": "100",
"os_process_timeout": "5000",
diff --git a/src/config/couchdb.rst b/src/config/couchdb.rst
index 241eabe..67061c0 100644
--- a/src/config/couchdb.rst
+++ b/src/config/couchdb.rst
@@ -50,25 +50,6 @@ Base CouchDB Options
[couchdb]
default_security = admin_local
- .. config:option:: delayed_commits :: Delayed commits
-
- When this config value is ``false`` the CouchDB provides a guarantee
- that `fsync` will be called before returning a :http:statuscode:`201`
- response on each document save. Setting this config value to ``true``
- may improve performance, at cost of some durability. For production use
- disabling this is strongly recommended::
-
- [couchdb]
- delayed_commits = false
-
- .. warning::
- Delayed commits are a feature of CouchDB that allows it to achieve
- better write performance for some workloads while sacrificing a
- small amount of durability. The setting causes CouchDB to wait up
- to a full second before committing new data after an update. If the
- server crashes before the header is written then any writes since
- the last commit are lost.
-
.. config:option:: file_compression :: Compression method for documents
.. versionchanged:: 1.2 Added `Google Snappy`_ compression algorithm.
@@ -90,15 +71,6 @@ Base CouchDB Options
.. _Google Snappy: http://code.google.com/p/snappy/
- .. config:option:: fsync_options :: Fsync options
-
- Specifies when to make `fsync` calls. `fsync` makes sure that the
- contents of any file system buffers kept by the operating system are
- flushed to disk. There is generally no need to modify this parameter. ::
-
- [couchdb]
- fsync_options = [before_header, after_header, on_file_open]
-
.. config:option:: max_dbs_open :: Limit of simultaneously opened databases
This option places an upper bound on the number of databases that can
diff --git a/src/maintenance/performance.rst b/src/maintenance/performance.rst
index defec5e..3afb90a 100644
--- a/src/maintenance/performance.rst
+++ b/src/maintenance/performance.rst
@@ -69,16 +69,6 @@ what the default configuration will support.
CouchDB Configuration Options
-----------------------------
-delayed_commits
-^^^^^^^^^^^^^^^
-
-The :config:option:`delayed commits <couchdb/delayed_commits>` allows to
-achieve better write performance for some workloads while sacrificing a small
-amount of durability. The setting causes CouchDB to wait up to a full second
-before committing new data after an update. If the server crashes before
-the header is written then any writes since the last commit are lost. Keep this
-option enabled on your own risk.
-
max_dbs_open
^^^^^^^^^^^^