couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [05/37] couch-replicator commit: updated refs/heads/master to aafb5f9
Date Thu, 28 Aug 2014 12:15:36 GMT
Cancel replication jobs on every node, not just owner node

It is safe to attempt to cancel a job owned by another node, just in
case ownership changed at the same time as the document was deleted.

BugzID: 19518


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

Branch: refs/heads/master
Commit: dd96e21930032fe6a2f6707ba3031268cc4ee187
Parents: ed447f8
Author: Robert Newson <robert.newson@cloudant.com>
Authored: Tue May 7 17:05:08 2013 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Tue Jul 29 13:22:05 2014 +0100

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/dd96e219/src/couch_replicator_manager.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_manager.erl b/src/couch_replicator_manager.erl
index 6afddd8..71e6be0 100644
--- a/src/couch_replicator_manager.erl
+++ b/src/couch_replicator_manager.erl
@@ -346,12 +346,11 @@ process_update(State, DbName, {Change}) ->
     {RepProps} = JsonRepDoc = get_json_value(doc, Change),
     DocId = get_json_value(<<"_id">>, RepProps),
     case {is_owner(DbName, DocId), get_json_value(deleted, Change, false)} of
-    {false, _} ->
-        replication_complete(DbName, DocId),
-        State;
-    {true, true} ->
+    {_, true} ->
         rep_doc_deleted(DbName, DocId),
         State;
+    {false, false} ->
+        State;
     {true, false} ->
         case get_json_value(<<"_replication_state">>, RepProps) of
         undefined ->


Mime
View raw message