couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [4/9] couch commit: updated refs/heads/windsor-merge to 2c36e16
Date Thu, 07 Aug 2014 17:57:21 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/efece0dd
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/efece0dd
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/efece0dd

Branch: refs/heads/windsor-merge
Commit: efece0dd277e27867983ee96a547426df57ea6c9
Parents: a7d4b8f
Author: Benjamin Bastian <benjamin.bastian@gmail.com>
Authored: Mon Mar 10 10:29:36 2014 -0400
Committer: Robert Newson <rnewson@apache.org>
Committed: Thu Aug 7 18:55:10 2014 +0100

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/efece0dd/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