You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by gi...@git.apache.org on 2017/04/21 20:04:37 UTC

[GitHub] nickva opened a new pull request #484: Apply random jitter during initial _replicator shard discovery

nickva opened a new pull request #484: Apply random jitter during initial _replicator shard discovery
URL: https://github.com/apache/couchdb/pull/484
 
 
   This is bringing back previous code:
   
   https://github.com/apache/couchdb/blob/884cf3e55f77ab1a5f26dc7202ce21771062eae6/src/couch_replicator_manager.erl#L940-L946
   
   The rationale is the following: during shard scanning a lot of `resume_scan`
   messages are sent back to back. This causes the replicator manager to open
   change feeds for all of those shards. By delaying `resume_scan` message by
   a jitter proportional to the number messages sent to far, it gives replicator
   manager a chance to open some change feeds, finish processing them and close
   them before newer resume_scan messages arrive.
   
   The random delay average starts 10 msec for first message, up to 1 min for 6000th and higher.
   Some sample values:
   
    * For 100 messages, average wait will be 1 second
    * For 1000 - 10 seconds
    * For 6000 and higher - 1 minute
   
   Jira: COUCHDB-3389
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services