You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/08/12 19:40:28 UTC

[1/3] couch-replicator commit: updated refs/heads/windsor-merge to 9640ccf

Repository: couchdb-couch-replicator
Updated Branches:
  refs/heads/windsor-merge 1b3238023 -> 9640ccf2e


Update changes_reader_cb for new Pending field

We've added a Pending count to changes messages that gets displayed in
replication task statuses. This just ignores that value in the
replication manager.


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

Branch: refs/heads/windsor-merge
Commit: e5e5d84b5c19b49c40a46530d7e3bcd1c8473110
Parents: 1b32380
Author: Paul J. Davis <pa...@gmail.com>
Authored: Tue Aug 12 12:38:15 2014 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Tue Aug 12 12:38:15 2014 -0500

----------------------------------------------------------------------
 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/e5e5d84b/src/couch_replicator_manager.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_manager.erl b/src/couch_replicator_manager.erl
index 9b1e818..3566433 100644
--- a/src/couch_replicator_manager.erl
+++ b/src/couch_replicator_manager.erl
@@ -308,7 +308,7 @@ changes_reader(Server, DbName, Since) ->
     ),
     ChangesFeedFun({fun ?MODULE:changes_reader_cb/3, {Server, DbName}}).
 
-changes_reader_cb({change, Change}, _, {Server, DbName}) ->
+changes_reader_cb({change, Change, _}, _, {Server, DbName}) ->
     case has_valid_rep_id(Change) of
         true ->
             Msg = {rep_db_update, DbName, Change},


[2/3] couch-replicator commit: updated refs/heads/windsor-merge to 9640ccf

Posted by da...@apache.org.
Fix return from the changes_reader_cb

CouchDB's changes enumerator doesn't support stopping the read midstream
so we need to not return a tagged accumulator.


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

Branch: refs/heads/windsor-merge
Commit: c6be20d1d1e644d76dc0f55ff3eec0e2c5170889
Parents: e5e5d84
Author: Paul J. Davis <pa...@gmail.com>
Authored: Tue Aug 12 12:39:28 2014 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Tue Aug 12 12:39:28 2014 -0500

----------------------------------------------------------------------
 src/couch_replicator_manager.erl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/c6be20d1/src/couch_replicator_manager.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_manager.erl b/src/couch_replicator_manager.erl
index 3566433..099b215 100644
--- a/src/couch_replicator_manager.erl
+++ b/src/couch_replicator_manager.erl
@@ -316,13 +316,13 @@ changes_reader_cb({change, Change, _}, _, {Server, DbName}) ->
         false ->
             ok
     end,
-    {ok, {Server, DbName}};
+    {Server, DbName};
 changes_reader_cb({stop, EndSeq, _Pending}, _, {Server, DbName}) ->
     Msg = {rep_db_checkpoint, DbName, EndSeq},
     ok = gen_server:call(Server, Msg, infinity),
-    {ok, {Server, DbName}};
+    {Server, DbName};
 changes_reader_cb(_, _, Acc) ->
-    {ok, Acc}.
+    Acc.
 
 has_valid_rep_id({Change}) ->
     has_valid_rep_id(get_json_value(<<"id">>, Change));


[3/3] couch-replicator commit: updated refs/heads/windsor-merge to 9640ccf

Posted by da...@apache.org.
Fix the owner check for local replicator dbs


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

Branch: refs/heads/windsor-merge
Commit: 9640ccf2e9182bcc7119c4cbde01714fad71b24a
Parents: c6be20d
Author: Paul J. Davis <pa...@gmail.com>
Authored: Tue Aug 12 12:40:14 2014 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Tue Aug 12 12:40:14 2014 -0500

----------------------------------------------------------------------
 src/couch_replicator_manager.erl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/9640ccf2/src/couch_replicator_manager.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_manager.erl b/src/couch_replicator_manager.erl
index 099b215..411e9e1 100644
--- a/src/couch_replicator_manager.erl
+++ b/src/couch_replicator_manager.erl
@@ -405,11 +405,13 @@ process_update(State, DbName, {Change}) ->
         end
     end.
 
-owner(DbName, DocId) ->
+owner(<<"shards/", _/binary>> = DbName, DocId) ->
     Live = [node()|nodes()],
     Nodes = lists:sort([N || #shard{node=N} <- mem3:shards(DbName, DocId),
 			     lists:member(N, Live)]),
-    node() =:= hd(mem3_util:rotate_list({DbName, DocId}, Nodes)).
+    node() =:= hd(mem3_util:rotate_list({DbName, DocId}, Nodes));
+owner(_DbName, _DocId) ->
+    true.
 
 rep_db_update_error(Error, DbName, DocId) ->
     case Error of