You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/08/01 18:05:20 UTC
[jira] [Commented] (COUCHDB-3088) restart of
couch_replication_server causes a stampede
[ https://issues.apache.org/jira/browse/COUCHDB-3088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15402534#comment-15402534 ]
ASF subversion and git services commented on COUCHDB-3088:
----------------------------------------------------------
Commit 884cf3e55f77ab1a5f26dc7202ce21771062eae6 in couchdb-couch-replicator's branch refs/heads/master from [~iilyak]
[ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch-replicator.git;h=884cf3e ]
Inject random delays in scan_all_dbs
couch_replication_server scans filesystem to find all _replication
databases. For every database found it does
gen_server:cast(Server, {resume_scan, DbName})
Extract independent process where we do gen_server:cast after a random delay.
This effectively removes stampede and randomizes the order in which we
process _replication databases.
COUCHDB-3088
> restart of couch_replication_server causes a stampede
> -----------------------------------------------------
>
> Key: COUCHDB-3088
> URL: https://issues.apache.org/jira/browse/COUCHDB-3088
> Project: CouchDB
> Issue Type: Bug
> Reporter: ILYA
>
> couch_replication_server scans all files in database_dir searching for files matching "_replicator.<number>.couch". For every _replication db it does gen_server:cast(Server, {resume_scan, DbName}). This creates a stampede effect and causes sharp load spikes on the replication cluster. The problem get worse if you migrate from older version of couchdb. In this case there is a logic which injects validation ddoc into every _replication db. Causing a spike in [couchdb, database_writes] metric.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)