Skip to content

Commit

Permalink
Create 3.2.2-docs branch after migrating docs to main repo
Browse files Browse the repository at this point in the history
This branch contains the 3.2.2 version of the docs but migrated to the
main CouchDB repo. After switching the URL repo in RDT we want to make
sure we still display the stable (aliased to 3.2.2) docs in RDT not
just the latest ones.

Main integration PR #4164
  • Loading branch information
nickva committed Sep 9, 2022
1 parent ae94872 commit 116a030
Show file tree
Hide file tree
Showing 33 changed files with 370 additions and 388 deletions.
6 changes: 0 additions & 6 deletions src/docs/src/api/basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -597,9 +597,3 @@ specific request types are provided in the corresponding API call reference.

The request was invalid, either because the supplied JSON was invalid, or
invalid information was supplied as part of the request.

- ``503 - Service Unavailable``

The request can't be serviced at this time, either because the cluster is overloaded,
maintenance is underway, or some other reason.
The request may be retried without changes, perhaps in a couple of minutes.
7 changes: 3 additions & 4 deletions src/docs/src/api/database/find.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@
:synopsis: Find documents within a given database

Find documents using a declarative JSON querying syntax.
Queries will use custom indexes, specified using the :ref:`_index <api/db/find/index>`
endpoint, if available.
Otherwise, they use the built-in :ref:`_all_docs <api/db/all_docs>` index, which
can be arbitrarily slow.
Queries can use the built-in :ref:`_all_docs <api/db/all_docs>` index or
custom indexes, specified using the :ref:`_index <api/db/find/index>`
endpoint.

:param db: Database name

Expand Down
10 changes: 5 additions & 5 deletions src/docs/src/api/server/authn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ For cookie authentication (:rfc:`2109`) CouchDB generates a token that the
client can use for the next few requests to CouchDB. Tokens are valid until
a timeout. When CouchDB sees a valid token in a subsequent request, it will
authenticate the user by this token without requesting the password again. By
default, cookies are valid for 10 minutes, but it's adjustable via :config:option:`timeout
default, cookies are valid for 10 minutes, but it's :config:option:`adjustable
<chttpd_auth/timeout>`. Also it's possible to make cookies
:config:option:`persistent <chttpd_auth/allow_persistent_cookies>`.

Expand Down Expand Up @@ -385,8 +385,8 @@ Two sections of config exist to configure JWT authentication;

The :config:option:`required_claims <jwt_auth/required_claims>` config
setting is a comma-separated list of additional mandatory JWT claims
that must be present in any presented JWT token. A :statuscode:`400`
is sent if any are missing.
that must be present in any presented JWT token. A `:code 400:Bad
Request` is sent if any are missing.

The ``alg`` claim is mandatory as it used to lookup the correct key for verifying the
signature.
Expand All @@ -407,8 +407,8 @@ list as long as the JWT token is valid.
; Examples
; hmac:_default = aGVsbG8=
; hmac:foo = aGVsbG8=
; The config values can represent symmetric and asymmetric keys.
; For symmetric keys, the value is base64 encoded;
; The config values can represent symmetric and asymmetrics keys.
; For symmetrics keys, the value is base64 encoded;
; hmac:_default = aGVsbG8= # base64-encoded form of "hello"
; For asymmetric keys, the value is the PEM encoding of the public
; key with newlines replaced with the escape sequence \n.
Expand Down
54 changes: 5 additions & 49 deletions src/docs/src/api/server/common.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@

.. versionchanged:: 2.1.0 Because of how the scheduling replicator works, continuous replication jobs could be periodically stopped and then started later. When they are not running they will not appear in the ``_active_tasks`` endpoint

.. versionchanged:: 3.3 Added `"bulk_get_attempts"` and `"bulk_get_docs"` fields for replication jobs.

.. http:get:: /_active_tasks
:synopsis: Obtains a list of the tasks running in the server

Expand Down Expand Up @@ -150,8 +148,6 @@
"continuous": false,
"doc_id": null,
"doc_write_failures": 0,
"bulk_get_attempts": 4524,
"bulk_get_docs": 4524,
"docs_read": 4524,
"docs_written": 4524,
"missing_revisions_found": 4524,
Expand Down Expand Up @@ -544,8 +540,8 @@
- **eventsource**: Like, ``continuous``, but sends
the events in `EventSource
<http://dev.w3.org/html5/eventsource/>`_ format.
:query number timeout: Number of *milliseconds* until CouchDB closes the
connection. Default is ``60000``.
:query number timeout: Number of seconds until CouchDB closes the
connection. Default is ``60``.
:query number heartbeat: Period in *milliseconds* after which an empty
line is sent in the results. Only applicable for ``longpoll``,
``continuous``, and ``eventsource`` feeds. Overrides any timeout to
Expand Down Expand Up @@ -661,8 +657,6 @@
``/_replicate``
===============

.. versionchanged:: 3.3 Added `"bulk_get_attempts"` and `"bulk_get_docs"` fields to the replication history response object.

.. http:post:: /_replicate
:synopsis: Starts or cancels the replication

Expand All @@ -678,7 +672,6 @@
:<json object create_target_params: An object that contains parameters
to be used when creating the target database. Can include the
standard ``q`` and ``n`` parameters.
:<json boolean winning_revs_only: Replicate winning revisions only.
:<json array doc_ids: Array of document IDs to be synchronized.
``doc_ids``, ``filter``, and ``selector`` are mutually exclusive.
:<json string filter: The name of a :ref:`filter function <filterfun>`.
Expand Down Expand Up @@ -734,10 +727,6 @@
:json number doc_write_failures: Number of document write failures
:json number docs_read: Number of documents read
:json number docs_written: Number of documents written to target
:json number bulk_get_attempts: The total count of attempted doc revisions
fetched with ``_bulk_get``.
:json number bulk_get_docs: The total count of successful docs fetched with
``_bulk_get``.
:json number end_last_seq: Last sequence number in changes stream
:json string end_time: Date/Time replication operation completed in
:rfc:`2822` format
Expand Down Expand Up @@ -784,8 +773,6 @@
{
"doc_write_failures": 0,
"docs_read": 10,
"bulk_get_attempts": 10,
"bulk_get_docs": 10,
"docs_written": 10,
"end_last_seq": 28,
"end_time": "Sun, 11 Aug 2013 20:38:50 GMT",
Expand All @@ -799,8 +786,6 @@
{
"doc_write_failures": 0,
"docs_read": 1,
"bulk_get_attempts": 1,
"bulk_get_docs": 1,
"docs_written": 1,
"end_last_seq": 1,
"end_time": "Sat, 10 Aug 2013 15:41:54 GMT",
Expand Down Expand Up @@ -927,8 +912,6 @@ request was made. The response will be a JSON structure containing the success
"history" : [
{
"docs_read" : 1000,
"bulk_get_attempts": 1000,
"bulk_get_docs": 1000,
"session_id" : "52c2370f5027043d286daca4de247db0",
"recorded_seq" : 1000,
"end_last_seq" : 1000,
Expand Down Expand Up @@ -1096,8 +1079,6 @@ error.
"doc_write_failures": 0,
"docs_read": 113,
"docs_written": 113,
"bulk_get_attempts": 113,
"bulk_get_docs": 113,
"missing_revisions_found": 113,
"revisions_checked": 113,
"source_seq": "113-g1AAAACTeJzLYWBgYMpgTmHgz8tPSTV0MDQy1zMAQsMckEQiQ1L9____szKYE01ygQLsZsYGqcamiZjKcRqRxwIkGRqA1H-oSbZgk1KMLCzTDE0wdWUBAF6HJIQ",
Expand Down Expand Up @@ -1130,8 +1111,6 @@ error.
"doc_write_failures": 0,
"docs_read": 12,
"docs_written": 12,
"bulk_get_attempts": 12,
"bulk_get_docs": 12,
"missing_revisions_found": 12,
"revisions_checked": 12,
"source_seq": "12-g1AAAACTeJzLYWBgYMpgTmHgz8tPSTV0MDQy1zMAQsMckEQiQ1L9____szKYE1lzgQLsBsZm5pZJJpjKcRqRxwIkGRqA1H-oSexgk4yMkhITjS0wdWUBADfEJBg",
Expand Down Expand Up @@ -1163,9 +1142,6 @@ error.
.. versionchanged:: 3.0.0 In error states the `"info"` field switched
from being a string to being an object

.. versionchanged:: 3.3 Added `"bulk_get_attempts"` and `"bulk_get_docs"` the
`"info"` object.

.. http:get:: /_scheduler/docs
:synopsis: Retrieve information about replication documents from the
``_replicator`` database.
Expand Down Expand Up @@ -1219,10 +1195,6 @@ error.
source.
:json number docs_written: The count of docs which have been written to the
target.
:json number bulk_get_attempts: The total count of attempted doc revisions
fetched with ``_bulk_get``.
:json number bulk_get_docs: The total count of successful docs fetched with
``_bulk_get``.
:json number changes_pending: The count of changes not yet replicated.
:json number doc_write_failures: The count of docs which failed to be
written to the target.
Expand Down Expand Up @@ -1259,8 +1231,6 @@ error.
"checkpointed_source_seq": "60-g1AAAACTeJzLYWBgYMpgTmHgz8tPSTV0MDQy1zMAQsMckEQiQ1L9____szKYEyVygQLsBsZm5pZJJpjKcRqRxwIkGRqA1H-oSSpgk4yMkhITjS0wdWUBAENCJEg",
"doc_write_failures": 0,
"docs_read": 67,
"bulk_get_attempts": 67,
"bulk_get_docs": 67,
"docs_written": 67,
"missing_revisions_found": 67,
"revisions_checked": 67,
Expand All @@ -1285,8 +1255,6 @@ error.
"changes_pending": null,
"checkpointed_source_seq": 0,
"doc_write_failures": 0,
"bulk_get_attempts": 12,
"bulk_get_docs": 12,
"docs_read": 12,
"docs_written": 12,
"missing_revisions_found": 12,
Expand Down Expand Up @@ -1364,10 +1332,6 @@ error.
source.
:json number docs_written: The count of docs which have been written to the
target.
:json number bulk_get_attempts: The total count of attempted doc revisions
fetched with ``_bulk_get``.
:json number bulk_get_docs: The total count of successful docs fetched with
``_bulk_get``.
:json number changes_pending: The count of changes not yet replicated.
:json number doc_write_failures: The count of docs which failed to be
written to the target.
Expand Down Expand Up @@ -1404,8 +1368,6 @@ error.
"checkpointed_source_seq": "60-g1AAAACTeJzLYWBgYMpgTmHgz8tPSTV0MDQy1zMAQsMckEQiQ1L9____szKYEyVygQLsBsZm5pZJJpjKcRqRxwIkGRqA1H-oSSpgk4yMkhITjS0wdWUBAENCJEg",
"doc_write_failures": 0,
"docs_read": 67,
"bulk_get_attempts": 67,
"bulk_get_docs": 67,
"docs_written": 67,
"missing_revisions_found": 67,
"revisions_checked": 67,
Expand Down Expand Up @@ -1472,10 +1434,6 @@ error.
source.
:json number docs_written: The count of docs which have been written to the
target.
:json number bulk_get_attempts: The total count of attempted doc revisions
fetched with ``_bulk_get``.
:json number bulk_get_docs: The total count of successful docs fetched with
``_bulk_get``.
:json number changes_pending: The count of changes not yet replicated.
:json number doc_write_failures: The count of docs which failed to be
written to the target.
Expand Down Expand Up @@ -1510,8 +1468,6 @@ error.
"checkpointed_source_seq": "60-g1AAAACTeJzLYWBgYMpgTmHgz8tPSTV0MDQy1zMAQsMckEQiQ1L9____szKYEyVygQLsBsZm5pZJJpjKcRqRxwIkGRqA1H-oSSpgk4yMkhITjS0wdWUBAENCJEg",
"doc_write_failures": 0,
"docs_read": 67,
"bulk_get_attempts": 67,
"bulk_get_docs": 67,
"docs_written": 67,
"missing_revisions_found": 67,
"revisions_checked": 67,
Expand Down Expand Up @@ -1891,9 +1847,9 @@ containing only the requested individual statistic.
...remaining couchdb metrics from _stats and _system
If an additional port config option is specified, then a client can call this API using
that port which does not require authentication. This option is ``false`` (OFF)
by default. When the option is ``true`` (ON), the default ports for a 3 node cluster
are ``17986``, ``27986``, ``37986``.
that port which does not require authentication. This option is ``false``(OFF) by default.
When the option ``true``(ON), the default ports for a 3 node cluster are ``17986``,
``27986``, ``37986``.
See :ref:`Configuration of Prometheus Endpoint <config/prometheus>` for details.

.. code-block:: http
Expand Down
5 changes: 2 additions & 3 deletions src/docs/src/best-practices/reverse-proxies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,8 @@ as ``http://domain.com/couchdb/db1/doc1`` are proxied to
.. code-block:: text
location /couchdb {
rewrite ^ $request_uri;
rewrite ^/couchdb/(.*) /$1 break;
proxy_pass http://localhost:5984$uri;
rewrite /couchdb/(.*) /$1 break;
proxy_pass http://localhost:5984;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
Expand Down
2 changes: 1 addition & 1 deletion src/docs/src/best-practices/views.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ the contents of the design document - not its name, ``_id`` or revision. This
means that two design documents with identical view code will share the same
on-disk view index files.

Here is a worked example, assuming your ``/db/_design/ddoc`` needs to be updated.
Here is a worked example, assuming your ``/db/_design/ddoc`` needs tobe updated.

1. Upload the old design doc to ``/db/_design/ddoc-old`` (or copy the document)
if you want an easy way to rollback in case of problems. The ``ddoc-old``
Expand Down
20 changes: 7 additions & 13 deletions src/docs/src/cluster/sharding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,9 @@ CouchDB nodes have a ``etc/default.ini`` file with a section named

These settings specify the default sharding parameters for newly created
databases. These can be overridden in the ``etc/local.ini`` file by copying the
text above, and replacing the values with your new defaults.
If ``[couch_peruser]`` ``q`` is set, that value is used for per-user databases.
(By default, it is set to 1, on the assumption that per-user dbs will be quite
small and there will be many of them.) The values can also be set on a
per-database basis by specifying the ``q`` and ``n`` query parameters when the
database is created. For example:
text above, and replacing the values with your new defaults. The values can
also be set on a per-database basis by specifying the ``q`` and ``n`` query
parameters when the database is created. For example:

.. code-block:: bash
Expand Down Expand Up @@ -103,13 +100,10 @@ refers to the number of replicas of each shard. In a default cluster where
request. There are no special roles for nodes inside the cluster.

The size of the required quorum can be configured at request time by
setting the ``r`` parameter for document reads, and the ``w``
parameter for document writes. The ``_view``, ``_find``, and
``_search`` endpoints read only one copy no matter what quorum is
configured, effectively making a quorum of 1 for these requests.

For example, here is a request that directs the coordinating node to
send a response once at least two nodes have responded:
setting the ``r`` parameter for document and view reads, and the ``w``
parameter for document writes. For example, here is a request that
directs the coordinating node to send a response once at least two nodes
have responded:

.. code-block:: bash
Expand Down
1 change: 1 addition & 0 deletions src/docs/src/cluster/theory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ We will focus on the shards and replicas for now.
A shard is a part of a database. It can be replicated multiple times. The more
copies of a shard, the more you can scale out. If you have 4 replicas, that
means that all 4 copies of this specific shard will live on at most 4 nodes.
With one replica you can have only one node, just as with CouchDB 1.x.
No node can have more than one copy of each shard replica. The default for
CouchDB since 3.0.0 is ``q=2`` and ``n=3``, meaning each database (and secondary
index) is split into 2 shards, with 3 replicas per shard, for a total of 6
Expand Down
Loading

0 comments on commit 116a030

Please sign in to comment.