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/12/22 06:20:45 UTC
[couchdb-documentation] 01/01: Switch replicator "info" error
message to be an object
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch replicator-info-error-as-object
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git
commit a9c0fb6b71681600087906f60be57eeb65f9e53b
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Sun Dec 22 01:17:08 2019 -0500
Switch replicator "info" error message to be an object
Companion to the implementation PR https://github.com/apache/couchdb/pull/2379
---
src/api/server/common.rst | 27 ++++++++++++++++++---------
src/replication/replicator.rst | 8 ++++++--
2 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/src/api/server/common.rst b/src/api/server/common.rst
index 7fee364..2517bb0 100644
--- a/src/api/server/common.rst
+++ b/src/api/server/common.rst
@@ -1045,6 +1045,9 @@ error.
documents and ``_active_tasks`` to get a complete state
summary
+.. versionchanged:: 3.0.0 In error states the `"info"` field switched
+ from being a string to being an object
+
.. http:get:: /_scheduler/docs
:synopsis: Retrieve information about replication documents from the
``_replicator`` database.
@@ -1074,9 +1077,11 @@ error.
:>json string target: Replication target
:>json string start_time: Timestamp of when the replication was started
:>json string last_update: Timestamp of last state update
- :>json object info: May contain additional information about the state.
- For error states, this will be a string. For success
- states this will contain a JSON object (see below).
+ :>json object info: May contain additional information about the
+ state. For error states, this will be an
+ object with an `"error"` field and a string
+ value. For success states this will contain a
+ JSON object (see below).
:>json number error_count: Consecutive errors count. Indicates how many
times in a row this replication has crashed.
Replication will be retried with an exponential
@@ -1210,9 +1215,11 @@ error.
:>json string target: Replication target
:>json string start_time: Timestamp of when the replication was started
:>json string last_update: Timestamp of last state update
- :>json object info: May contain additional information about the state.
- For error states, this will be a string. For success
- states this will contain a JSON object (see below).
+ :>json object info: May contain additional information about the
+ state. For error states, this will be an
+ object with an `"error"` field and a string
+ value. For success states this will contain a
+ JSON object (see below).
:>json number error_count: Consecutive errors count. Indicates how many
times in a row this replication has crashed.
Replication will be retried with an exponential
@@ -1311,9 +1318,11 @@ error.
:>json string target: Replication target
:>json string start_time: Timestamp of when the replication was started
:>json string last_update: Timestamp of last state update
- :>json object info: May contain additional information about the state.
- For error states, this will be a string. For success
- states this will contain a JSON object (see below).
+ :>json object info: May contain additional information about the
+ state. For error states, this will be an
+ object with an `"error"` field and a string
+ value. For success states this will contain a
+ JSON object (see below).
:>json number error_count: Consecutive errors count. Indicates how many
times in a row this replication has crashed.
Replication will be retried with an exponential
diff --git a/src/replication/replicator.rst b/src/replication/replicator.rst
index 708de29..de53930 100644
--- a/src/replication/replicator.rst
+++ b/src/replication/replicator.rst
@@ -207,7 +207,9 @@ crashes with an increasingly larger interval. The ``history`` list from
"doc_id": "my_rep_crashing",
"error_count": 6,
"id": "cb78391640ed34e9578e638d9bb00e44+create_target",
- "info": "db_not_found: could not open http://adm:*****@localhost:5984/missing/",
+ "info": {
+ "error": "db_not_found: could not open http://adm:*****@localhost:5984/missing/"
+ },
"last_updated": "2017-04-05T20:55:10Z",
"node": "node1@127.0.0.1",
"source_proxy": null,
@@ -263,7 +265,9 @@ exactly why it failed:
"doc_id": "my_rep_dup",
"error_count": 1,
"id": null,
- "info": "Replication `a81a78e822837e66df423d54279c15fe+continuous+create_target` specified by document `my_rep_dup` already started, triggered by document `my_rep` from db `_replicator`",
+ "info": {
+ "error": "Replication `a81a78e822837e66df423d54279c15fe+continuous+create_target` specified by document `my_rep_dup` already started, triggered by document `my_rep` from db `_replicator`"
+ },
"last_updated": "2017-04-05T21:41:51Z",
"source": "http://myserver.com/foo/",
"start_time": "2017-04-05T21:41:51Z",