Description
We have seen issues that capi replication restarted repeatedly. This is especially problematic in backfill mode where replication, on restart, may rollback to 0 and hence not making progress. We need to make a number of capi runtime parameters configurable to make it possible to reduce the frequency of capi replication restart.
Following is the list of such parameters and their default values:
// max retry for capi batchUpdateDocs operation
var CapiMaxRetryBatchUpdateDocs = 6
// timeout for batch processing in capi
// 1. http timeout in revs_diff, i.e., batchGetMeta, call to target
// 2. overall timeout for batchUpdateDocs operation
var CapiBatchTimeout = 180 * time.Second
// timeout for tcp write operation in capi
var CapiWriteTimeout = 10 * time.Second
// timeout for tcp read operation in capi
var CapiReadTimeout = 60 * time.Second
Their values can be changed at runtime through the following non-public rest api:
curl -X POST -u Administrator:welcome http://[hostname]:9998/xdcr/internalSettings -d CapiMaxRetryBatchUpdateDocs=10