couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vatam...@apache.org
Subject [2/2] couch-replicator commit: updated refs/heads/3082-replication-manager-rep_start_pids-fix to 3d7445c
Date Tue, 26 Jul 2016 19:58:20 GMT
Replication manager's rep_start_pids now contains only {Tag, Pid} items

Previously the local change feed was added to rep_start_pids as Pid only. So if
replication manager stopped and terminate/2 was called before that change
feed died, then

```
foreach(fun({_Tag, Pid}) -> ... end, [StartPids])
```

would crash with a function clause error.

Make sure add the replicator db name to the changes feed.

Jira: COUCHDB-3082


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/commit/3d7445c0
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/3d7445c0
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/3d7445c0

Branch: refs/heads/3082-replication-manager-rep_start_pids-fix
Commit: 3d7445c0106b2439efb33f96a88c88dc75caffa9
Parents: e87786f
Author: Nick Vatamaniuc <vatamane@gmail.com>
Authored: Tue Jul 26 15:56:42 2016 -0400
Committer: Nick Vatamaniuc <vatamane@gmail.com>
Committed: Tue Jul 26 15:56:42 2016 -0400

----------------------------------------------------------------------
 src/couch_replicator_manager.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/3d7445c0/src/couch_replicator_manager.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_manager.erl b/src/couch_replicator_manager.erl
index dca1154..0b7eeca 100644
--- a/src/couch_replicator_manager.erl
+++ b/src/couch_replicator_manager.erl
@@ -183,7 +183,7 @@ init(_) ->
         scan_pid = ScanPid,
         max_retries = retries_value(
             config:get("replicator", "max_replication_retry_count", "10")),
-        rep_start_pids = [Pid],
+        rep_start_pids = [{?REPLICATOR_DB, Pid}],
         live = Live,
         epoch = Epoch
     }}.


Mime
View raw message