CouchDB 1.6 连续复制:连接失败后如何配置恢复时间

CouchDB 1.6 continuous replication: how to configure resume time after connection failure

我有一个包含许多不同节点的网络,每个节点 运行 一个不同的 CouchDB 实例。 每个实例在 _replicator 数据库中都有文档,以设置与网络中其他一些节点的连续(主-主)复制。 这些节点可以离线一段未定义的、不可预见的时间间隔。 一切都适用于复制,但我遇到了节点离线时超时的问题。

CouchDB 文档说 (http://docs.couchdb.org/en/1.6.1/replication/replicator.html)

"When you PUT/POST a document to the _replicator database, CouchDB will attempt to start the replication up to 10 times (configurable under [replicator], parameter max_replication_retry_count). If it fails on the first attempt, it waits 5 seconds before doing a second attempt. If the second attempt fails, it waits 10 seconds before doing a third attempt. If the third attempt fails, it waits 20 seconds before doing a fourth attempt (each attempt doubles the previous wait period)."

当复制目标节点脱机(因此复制失败)时,日志文件显示

5 秒后重新开始复制​​。 10 秒后重新启动复制。 20 秒后重新启动复制。 40 秒后重新启动复制。 80 秒后重新启动复制。 在 160 秒后重新启动复制。 在 320 秒后重新启动复制。 在 600 秒后重新启动复制。 600 秒后重新启动复制...(600 秒似乎是最大超时)

我需要加快连接断开后恢复复制的速度。

这个值是否硬编码在 CouchDB 源代码中?

redefine/override 600 间隔是否有其他参数?

您不能更改 CouchDB 中的初始延迟和最大延迟 1.x。它们各自的值(2.5 秒 [立即乘以 2 得到 5 秒] 和 600 秒)在源文件中被硬编码 couch_replicator_manager.erl 并且除非您修改 CouchDB 本身,否则无法修改。