You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2017/03/14 19:26:18 UTC

[23/50] couch-replicator commit: updated refs/heads/63012-scheduler to 27a5eae

Remove redunant comparison function


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

Branch: refs/heads/63012-scheduler
Commit: 36367d094730855c852b1306b9a4e3ea1bcad56d
Parents: f41fd67
Author: Nick Vatamaniuc <va...@apache.org>
Authored: Wed Nov 9 17:42:14 2016 -0500
Committer: Nick Vatamaniuc <va...@apache.org>
Committed: Wed Nov 9 17:42:14 2016 -0500

----------------------------------------------------------------------
 src/couch_replicator_doc_processor.erl | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/36367d09/src/couch_replicator_doc_processor.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_doc_processor.erl b/src/couch_replicator_doc_processor.erl
index dddde0f..8ee1fe7 100644
--- a/src/couch_replicator_doc_processor.erl
+++ b/src/couch_replicator_doc_processor.erl
@@ -217,7 +217,7 @@ code_change(_OldVsn, State, _Extra) ->
 % same document.
 -spec updated_doc(db_doc_id(), #rep{}, filter_type()) -> ok.
 updated_doc(Id, Rep, Filter) ->
-    case compare_replication_records(current_rep(Id), Rep) of
+    case normalize_rep(current_rep(Id)) == normalize_rep(Rep) of
         false ->
             removed_doc(Id),
             Row = #rdoc{
@@ -238,11 +238,6 @@ updated_doc(Id, Rep, Filter) ->
     end.
 
 
--spec compare_replication_records(#rep{}, #rep{}) -> boolean().
-compare_replication_records(Rep1, Rep2) ->
-    normalize_rep(Rep1) == normalize_rep(Rep2).
-
-
 % Return current #rep{} record if any. If replication hasn't been submitted
 % to the scheduler yet, #rep{} record will be in the document processor's
 % ETS table, otherwise query scheduler for the #rep{} record.