couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [1/2] couch-replicator commit: updated refs/heads/master to f67ebff
Date Mon, 15 Aug 2016 09:21:46 GMT
Repository: couchdb-couch-replicator
Updated Branches:
  refs/heads/master c233beaec -> f67ebff22


Fix replicator manager `stop` change feed callback

```
changes_reader_cb({stop, EndSeq, _Pending}, ...) ->
   ...
```

at one point used to handle changes from `fabric:changes`. It was later
optimized to use shard change feeds, but shard change feed callbacks don't get
pending info with the `stop` message.

As a result replicator manager would always rescan all the changes in a shard
on any new change.

For reference, where `couch_changes.erl` calls the callback:
 https://github.com/apache/couchdb-couch/blob/master/src/couch_changes.erl#L654

Jira: COUCHDB-3104


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/40a08763
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/40a08763
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/40a08763

Branch: refs/heads/master
Commit: 40a087630b9b6688fe2db87f1e8adc7972c4a0c9
Parents: c233bea
Author: Nick Vatamaniuc <vatamane@gmail.com>
Authored: Mon Aug 15 02:50:56 2016 -0400
Committer: Nick Vatamaniuc <vatamane@gmail.com>
Committed: Mon Aug 15 02:50:56 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/40a08763/src/couch_replicator_manager.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_manager.erl b/src/couch_replicator_manager.erl
index c36526d..cb38133 100644
--- a/src/couch_replicator_manager.erl
+++ b/src/couch_replicator_manager.erl
@@ -388,7 +388,7 @@ changes_reader_cb({change, Change, _}, _, {Server, DbName, Epoch}) ->
             ok
     end,
     {Server, DbName, Epoch};
-changes_reader_cb({stop, EndSeq, _Pending}, _, {Server, DbName, Epoch}) ->
+changes_reader_cb({stop, EndSeq}, _, {Server, DbName, Epoch}) ->
     Msg = {rep_db_checkpoint, DbName, EndSeq},
     ok = gen_server:call(Server, Msg, infinity),
     {Server, DbName, Epoch};


Mime
View raw message