couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [08/26] couch commit: updated refs/heads/windsor-merge to 14dc5e9
Date Tue, 26 Aug 2014 09:46:03 GMT
Make rev tree stemming for interactives optional

Documents with many conflicts and/or tombstones cause significant
performance degradation for couch_db_updater due to the stemming of rev
trees. This commit helps to fix this problem by making rev tree stemming
on interactive updates optional. This change makes it possible for rev
trees to temporarily become longer than revs_limit. When active, the
burden of rev tree stemming will fall on replication and compaction.

BugzID: 30438


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

Branch: refs/heads/windsor-merge
Commit: e32f1666527589f0f1cf0113d35a9a4810f4144f
Parents: dfe0e65
Author: Benjamin Bastian <benjamin.bastian@gmail.com>
Authored: Tue Apr 29 13:21:34 2014 -0700
Committer: Robert Newson <rnewson@apache.org>
Committed: Tue Aug 26 10:42:38 2014 +0100

----------------------------------------------------------------------
 src/couch_key_tree.erl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/e32f1666/src/couch_key_tree.erl
----------------------------------------------------------------------
diff --git a/src/couch_key_tree.erl b/src/couch_key_tree.erl
index 9ad6f7f..57c08a0 100644
--- a/src/couch_key_tree.erl
+++ b/src/couch_key_tree.erl
@@ -76,7 +76,10 @@ stem/2
                 {revtree(), new_leaf | new_branch | internal_node}.
 merge(RevTree, Tree, StemDepth) ->
     {Merged, Result} = merge(RevTree, Tree),
-    {stem(Merged, StemDepth), Result}.
+    case config:get("couchdb", "stem_interactive_updates", "true") of
+        "true" -> {stem(Merged, StemDepth), Result};
+        _ -> {Merged, Result}
+    end.
 
 
 %% @doc Merge a path into a tree.


Mime
View raw message