Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 83293200BE7 for ; Tue, 15 Nov 2016 01:21:29 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 81D68160B06; Tue, 15 Nov 2016 00:21:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C9363160B0D for ; Tue, 15 Nov 2016 01:21:28 +0100 (CET) Received: (qmail 51205 invoked by uid 500); 15 Nov 2016 00:21:28 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 51185 invoked by uid 99); 15 Nov 2016 00:21:27 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2016 00:21:27 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D24A1E08B3; Tue, 15 Nov 2016 00:21:27 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: iilyak@apache.org To: commits@couchdb.apache.org Date: Tue, 15 Nov 2016 00:21:28 -0000 Message-Id: In-Reply-To: <46383ddf7d95449caffaf3cc2b3490b8@git.apache.org> References: <46383ddf7d95449caffaf3cc2b3490b8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/3] fabric commit: updated refs/heads/master to 9f82e5b archived-at: Tue, 15 Nov 2016 00:21:29 -0000 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 Authored: Mon Nov 14 13:17:12 2016 -0800 Committer: ILYA Khlopotov 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])