Skip to content
This repository was archived by the owner on Oct 17, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/api/database/bulk-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand Down
6 changes: 0 additions & 6 deletions src/api/database/common.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand Down Expand Up @@ -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
Expand Down
16 changes: 7 additions & 9 deletions src/api/database/compact.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
7 changes: 1 addition & 6 deletions src/api/document/attachments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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*

Expand Down Expand Up @@ -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*
Expand Down
10 changes: 1 addition & 9 deletions src/api/document/common.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand Down Expand Up @@ -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*
Expand Down Expand Up @@ -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*
Expand Down
1 change: 0 additions & 1 deletion src/api/server/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
28 changes: 0 additions & 28 deletions src/config/couchdb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
10 changes: 0 additions & 10 deletions src/maintenance/performance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
^^^^^^^^^^^^

Expand Down
7 changes: 3 additions & 4 deletions src/replication/protocol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1303,10 +1303,9 @@ with the following mandatory fields:
Documents with the specified Revision (field ``_rev``) value as-is without
generating a new revision. Always ``false``

The request also MAY contain :header:`X-Couch-Full-Commit` that controls
CouchDB :config:option:`commit policy <couchdb/delayed_commits>`. Other Peers
MAY ignore this header or use it to control similar local
feature.
The request also MAY contain :header:`X-Couch-Full-Commit` that used to control
CouchDB <3.0 behavior when delayed commits were enabled. Other Peers MAY ignore
this header or use it to control similar local feature.

**Request**:

Expand Down