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 AD691200BCC for ; Tue, 15 Nov 2016 01:02:57 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A7587160B18; Tue, 15 Nov 2016 00:02:57 +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 026EE160B06 for ; Tue, 15 Nov 2016 01:02:56 +0100 (CET) Received: (qmail 3292 invoked by uid 500); 15 Nov 2016 00:02:56 -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 3281 invoked by uid 99); 15 Nov 2016 00:02:56 -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:02:56 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0F0F5E00C7; Tue, 15 Nov 2016 00:02:56 +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:02:56 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/3] fabric commit: updated refs/heads/master to f427ad0 archived-at: Tue, 15 Nov 2016 00:02:57 -0000 Repository: couchdb-fabric Updated Branches: refs/heads/master fb4b6b3f9 -> f427ad0da Revert "Merge remote-tracking branch 'banjiewen/stale-stable-update'" This reverts commit 508122c52731a9eac3e83f8d727f2355f019fe1f, reversing changes made to d68a00fdeba9113bd1a3dd41d8e546b05bb2e533. Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/a8e0e954 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/a8e0e954 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/a8e0e954 Branch: refs/heads/master Commit: a8e0e9549bb2a1181538ae433f1de78abadc41d5 Parents: fb4b6b3 Author: ILYA Khlopotov Authored: Mon Nov 14 13:10:39 2016 -0800 Committer: ILYA Khlopotov Committed: Mon Nov 14 13:10:39 2016 -0800 ---------------------------------------------------------------------- src/fabric_view.erl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/a8e0e954/src/fabric_view.erl ---------------------------------------------------------------------- diff --git a/src/fabric_view.erl b/src/fabric_view.erl index 01291a9..a766348 100644 --- a/src/fabric_view.erl +++ b/src/fabric_view.erl @@ -302,13 +302,14 @@ index_of(X, [X|_Rest], I) -> index_of(X, [_|Rest], I) -> index_of(X, Rest, I+1). -get_shards(DbName, #mrargs{stable=true}) -> +get_shards(DbName, #mrargs{stale=Stale}) + when Stale == ok orelse Stale == update_after -> mem3:ushards(DbName); -get_shards(DbName, #mrargs{stable=false}) -> +get_shards(DbName, #mrargs{stale=false}) -> mem3:shards(DbName). maybe_update_others(DbName, DDoc, ShardsInvolved, ViewName, - #mrargs{update=lazy} = Args) -> + #mrargs{stale=update_after} = 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])