You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2016/10/06 19:34:53 UTC

[1/2] fabric commit: updated refs/heads/master to 508122c

Repository: couchdb-fabric
Updated Branches:
  refs/heads/master d68a00fde -> 508122c52


Replace "stale" with "stable" when picking shards

COUCHDB-3063


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

Branch: refs/heads/master
Commit: e80a744a02cf6194df9afca8359c561e47034f18
Parents: ebea1b8
Author: Benjamin Anderson <b...@banjiewen.net>
Authored: Sun Jul 17 14:46:54 2016 -0700
Committer: Benjamin Anderson <b...@banjiewen.net>
Committed: Sun Jul 17 14:46:54 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/e80a744a/src/fabric_view.erl
----------------------------------------------------------------------
diff --git a/src/fabric_view.erl b/src/fabric_view.erl
index 50896cf..3db84e8 100644
--- a/src/fabric_view.erl
+++ b/src/fabric_view.erl
@@ -302,10 +302,9 @@ 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).
 
 get_shard_replacements(DbName, UsedShards0) ->


[2/2] fabric commit: updated refs/heads/master to 508122c

Posted by rn...@apache.org.
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/master
Commit: 508122c52731a9eac3e83f8d727f2355f019fe1f
Parents: d68a00f e80a744
Author: Robert Newson <rn...@apache.org>
Authored: Thu Oct 6 19:00:41 2016 +0100
Committer: Robert Newson <rn...@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.