You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ii...@apache.org on 2016/11/15 00:21:27 UTC

[1/3] fabric commit: updated refs/heads/master to 9f82e5b

Repository: couchdb-fabric
Updated Branches:
  refs/heads/master f427ad0da -> 9f82e5b84


Upgrade #mrargs{} record


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

Branch: refs/heads/master
Commit: f14cd78590e650ae070e2f40dde101c1dde8ed83
Parents: f427ad0
Author: ILYA Khlopotov <ii...@apache.org>
Authored: Mon Nov 14 13:17:09 2016 -0800
Committer: ILYA Khlopotov <ii...@apache.org>
Committed: Mon Nov 14 16:06:31 2016 -0800

----------------------------------------------------------------------
 src/fabric_util.erl | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/f14cd785/src/fabric_util.erl
----------------------------------------------------------------------
diff --git a/src/fabric_util.erl b/src/fabric_util.erl
index e6dd86e..7e3f23e 100644
--- a/src/fabric_util.erl
+++ b/src/fabric_util.erl
@@ -329,8 +329,7 @@ upgrade_mrargs({mrargs,
         Skip,
         GroupLevel,
         Group,
-        Stable,
-        Update,
+        Stale,
         MultiGet,
         InclusiveEnd,
         IncludeDocs,
@@ -340,10 +339,10 @@ upgrade_mrargs({mrargs,
         Callback,
         Sorted,
         Extra}) ->
-    Stale = case {Stable, Update} of
-            {true, false} -> ok;
-            {true, lazy} -> update_after;
-            {_, _} -> false
+    {Stable, Update} = case Stale of
+        ok -> {true, false};
+        update_after -> {true, lazy};
+        _ -> {false, true}
     end,
     #mrargs{
         view_type = ViewType,
@@ -359,7 +358,8 @@ upgrade_mrargs({mrargs,
         skip = Skip,
         group_level = GroupLevel,
         group = Group,
-        stale = Stale,
+        stable = Stable,
+        update = Update,
         multi_get = MultiGet,
         inclusive_end = InclusiveEnd,
         include_docs = IncludeDocs,


[2/3] fabric commit: updated refs/heads/master to 9f82e5b

Posted by ii...@apache.org.
Revert "Revert "Merge remote-tracking branch 'banjiewen/stale-stable-update'""

This reverts commit a8e0e9549bb2a1181538ae433f1de78abadc41d5.

Note: Re-aplying previously reverted merge


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

Branch: refs/heads/master
Commit: 4377acf2d1bcbe7fd0078417f038d1da93d86fd2
Parents: f14cd78
Author: ILYA Khlopotov <ii...@apache.org>
Authored: Mon Nov 14 13:17:12 2016 -0800
Committer: ILYA Khlopotov <ii...@apache.org>
Committed: Mon Nov 14 16:06:52 2016 -0800

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


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/4377acf2/src/fabric_view.erl
----------------------------------------------------------------------
diff --git a/src/fabric_view.erl b/src/fabric_view.erl
index a766348..01291a9 100644
--- a/src/fabric_view.erl
+++ b/src/fabric_view.erl
@@ -302,14 +302,13 @@ 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])


[3/3] fabric commit: updated refs/heads/master to 9f82e5b

Posted by ii...@apache.org.
Merge remote branch 'cloudant:77984-upgrade-mrargs-record-phase2'

This closes #78

Signed-off-by: ILYA Khlopotov <ii...@apache.org>


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

Branch: refs/heads/master
Commit: 9f82e5b84f407761e29ab46e5f039f19d28b8b70
Parents: f427ad0 4377acf
Author: ILYA Khlopotov <ii...@apache.org>
Authored: Mon Nov 14 16:21:11 2016 -0800
Committer: ILYA Khlopotov <ii...@apache.org>
Committed: Mon Nov 14 16:21:11 2016 -0800

----------------------------------------------------------------------
 src/fabric_util.erl | 14 +++++++-------
 src/fabric_view.erl |  7 +++----
 2 files changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------