couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vatam...@apache.org
Subject [1/2] couch-replicator commit: updated refs/heads/master to 1644696
Date Wed, 08 Feb 2017 17:50:52 GMT
Repository: couchdb-couch-replicator
Updated Branches:
  refs/heads/master b18b31c63 -> 1644696c8


Use string formatting to shorten document ID during logging.

Previously used an explicit lists:sublist call but value was never used
anywhere besides the log message.

COUCHDB-3291


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

Branch: refs/heads/master
Commit: c306fab27dbd88d8ecc8f60fb5ec04e7911fd786
Parents: b18b31c
Author: Nick Vatamaniuc <vatamane@apache.org>
Authored: Wed Feb 8 12:02:34 2017 -0500
Committer: Nick Vatamaniuc <vatamane@apache.org>
Committed: Wed Feb 8 12:02:34 2017 -0500

----------------------------------------------------------------------
 src/couch_replicator_changes_reader.erl | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/c306fab2/src/couch_replicator_changes_reader.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_changes_reader.erl b/src/couch_replicator_changes_reader.erl
index f9d9097..497de93 100644
--- a/src/couch_replicator_changes_reader.erl
+++ b/src/couch_replicator_changes_reader.erl
@@ -92,10 +92,9 @@ process_change(#doc_info{id = <<>>} = DocInfo, {_, Db, _, _,
_}) ->
 process_change(#doc_info{id = Id} = DocInfo, {Parent, Db, ChangesQueue, _, _}) ->
     case is_doc_id_too_long(byte_size(Id)) of
         true ->
-            ShortId = lists:sublist(binary_to_list(Id), 64),
             SourceDb = couch_replicator_api_wrap:db_uri(Db),
             couch_log:error("Replicator: document id `~s...` from source db "
-                " `~s` is too long, ignoring.", [ShortId, SourceDb]),
+                " `~64s` is too long, ignoring.", [Id, SourceDb]),
             Stats = couch_replicator_stats:new([{doc_write_failures, 1}]),
             ok = gen_server:call(Parent, {add_stats, Stats}, infinity);
         false ->


Mime
View raw message