couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject [23/50] fabric commit: updated refs/heads/2971-count-distinct to 5d18415
Date Wed, 01 Mar 2017 16:38:21 GMT
Merge remote-tracking branch 'banjiewen/stale-stable-update'


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

Branch: refs/heads/2971-count-distinct
Commit: 508122c52731a9eac3e83f8d727f2355f019fe1f
Parents: d68a00f e80a744
Author: Robert Newson <rnewson@apache.org>
Authored: Thu Oct 6 19:00:41 2016 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Thu Oct 6 19:06:08 2016 +0100

----------------------------------------------------------------------
 src/fabric_view.erl | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/508122c5/src/fabric_view.erl
----------------------------------------------------------------------
diff --cc src/fabric_view.erl
index a766348,3db84e8..01291a9
--- a/src/fabric_view.erl
+++ b/src/fabric_view.erl
@@@ -302,21 -302,11 +302,20 @@@ index_of(X, [X|_Rest], I) -
  index_of(X, [_|Rest], I) ->
      index_of(X, Rest, I+1).
  
- get_shards(DbName, #mrargs{stale=Stale})
-   when Stale == ok orelse Stale == update_after ->
+ get_shards(DbName, #mrargs{stable=true}) ->
      mem3:ushards(DbName);
- get_shards(DbName, #mrargs{stale=false}) ->
+ get_shards(DbName, #mrargs{stable=false}) ->
      mem3:shards(DbName).
  
 +maybe_update_others(DbName, DDoc, ShardsInvolved, ViewName,
-     #mrargs{stale=update_after} = Args) ->
++    #mrargs{update=lazy} = Args) ->
 +    ShardsNeedUpdated = mem3:shards(DbName) -- ShardsInvolved,
 +    lists:foreach(fun(#shard{node=Node, name=ShardName}) ->
 +        rpc:cast(Node, fabric_rpc, update_mrview, [ShardName, DDoc, ViewName, Args])
 +    end, ShardsNeedUpdated);
 +maybe_update_others(_DbName, _DDoc, _ShardsInvolved, _ViewName, _Args) ->
 +    ok.
 +
  get_shard_replacements(DbName, UsedShards0) ->
      % We only want to generate a replacements list from shards
      % that aren't already used.


Mime
View raw message