couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [03/26] couch commit: updated refs/heads/windsor-merge to 14dc5e9
Date Tue, 26 Aug 2014 09:45:58 GMT
Add doc ID for last merged key tree to proc dict

This is for debugging purposes, ie. for operators to get the ID of a
heavily conflicted document which is taking a lot of time to merge.

BugzID: 28940


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/dfe0e658
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/dfe0e658
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/dfe0e658

Branch: refs/heads/windsor-merge
Commit: dfe0e658d8c50831033b20825343773c7af543b9
Parents: 6083a37
Author: Benjamin Bastian <benjamin.bastian@gmail.com>
Authored: Mon Mar 10 10:29:36 2014 -0400
Committer: Robert Newson <rnewson@apache.org>
Committed: Tue Aug 26 10:42:38 2014 +0100

----------------------------------------------------------------------
 src/couch_db_updater.erl | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/dfe0e658/src/couch_db_updater.erl
----------------------------------------------------------------------
diff --git a/src/couch_db_updater.erl b/src/couch_db_updater.erl
index 88fa3b3..504c21e 100644
--- a/src/couch_db_updater.erl
+++ b/src/couch_db_updater.erl
@@ -629,6 +629,7 @@ merge_rev_trees(_Limit, _Merge, [], [], AccNewInfos, AccRemoveSeqs, AccSeq)
->
     {ok, lists:reverse(AccNewInfos), AccRemoveSeqs, AccSeq};
 merge_rev_trees(Limit, MergeConflicts, [NewDocs|RestDocsList],
         [OldDocInfo|RestOldInfo], AccNewInfos, AccRemoveSeqs, AccSeq) ->
+    erlang:put(last_id_merged, OldDocInfo#full_doc_info.id), % for debugging
     NewDocInfo0 = lists:foldl(fun({Client, NewDoc}, OldInfoAcc) ->
         merge_rev_tree(OldInfoAcc, NewDoc, Client, Limit, MergeConflicts)
     end, OldDocInfo, NewDocs),


Mime
View raw message