couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [22/50] fabric commit: updated refs/heads/windsor-merge-121 to 79e6e2f
Date Fri, 01 Aug 2014 09:12:10 GMT
Allow to omit seq from some rows in _changes response

This is a hack to improve the throughput of _changes on databases with
large Q values.  The record-based approach for sharing config options is
a pain to extend so we're going to be dirty and use the pdict here.

BugzID: 23637


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

Branch: refs/heads/windsor-merge-121
Commit: 687bd9d48b2a688b68cc2a910e94e41be0a915bf
Parents: f38bc21
Author: Adam Kocoloski <adam@cloudant.com>
Authored: Tue Oct 1 21:41:52 2013 -0400
Committer: Robert Newson <rnewson@apache.org>
Committed: Thu Jul 31 11:19:02 2014 +0100

----------------------------------------------------------------------
 src/fabric_view_changes.erl | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/687bd9d4/src/fabric_view_changes.erl
----------------------------------------------------------------------
diff --git a/src/fabric_view_changes.erl b/src/fabric_view_changes.erl
index dff9d4a..8d162ce 100644
--- a/src/fabric_view_changes.erl
+++ b/src/fabric_view_changes.erl
@@ -202,7 +202,13 @@ handle_message(#change{key=Key} = Row0, {Worker, From}, St) ->
         % created from DOWN messages would have led to errors
         case fabric_view:is_progress_possible(S2) of
         true ->
-            Row = Row0#change{key = pack_seqs(S2)},
+            % Temporary hack for FB 23637
+            Interval = erlang:get(changes_seq_interval),
+            if (Interval == undefined) orelse (Limit rem Interval == 0) ->
+                Row = Row0#change{key = pack_seqs(S2)};
+            true ->
+                Row = Row0#change{key = null}
+            end,
             {Go, Acc} = Callback(changes_row(Row, IncludeDocs), AccIn),
             gen_server:reply(From, Go),
             {Go, St#collector{counters=S2, limit=Limit-1, user_acc=Acc}};


Mime
View raw message