Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2598A11ED4 for ; Fri, 22 Aug 2014 10:07:38 +0000 (UTC) Received: (qmail 51326 invoked by uid 500); 22 Aug 2014 10:07:37 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 51268 invoked by uid 500); 22 Aug 2014 10:07:37 -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 51259 invoked by uid 99); 22 Aug 2014 10:07:37 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Aug 2014 10:07:37 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 89B289C7A65; Fri, 22 Aug 2014 10:07:37 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davisp@apache.org To: commits@couchdb.apache.org Message-Id: <8f4c8f3695054362ba273d6826ec1730@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: Fix race condition by relying on admin only Date: Fri, 22 Aug 2014 10:07:37 +0000 (UTC) Repository: couchdb-global-changes Updated Branches: refs/heads/windsor-merge 727868f16 -> 5c0b30e2e Fix race condition by relying on admin only Since we no longer have to worry about filtering for users we can let fabric take care of the underlying limit implementation for now. Without this there's a race condition where fabric will wait for Timeout seconds before actually stopping. Any activity in that window will be sent through the callback and forwarded on to clients. There's probably a way to fix that but my brain isn't working so well right now. Project: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/commit/5c0b30e2 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/tree/5c0b30e2 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/diff/5c0b30e2 Branch: refs/heads/windsor-merge Commit: 5c0b30e2e63a22d100bdc4bf532c1df73fbb9b59 Parents: 727868f Author: Paul J. Davis Authored: Fri Aug 22 05:05:59 2014 -0500 Committer: Paul J. Davis Committed: Fri Aug 22 05:05:59 2014 -0500 ---------------------------------------------------------------------- src/global_changes_httpd.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/blob/5c0b30e2/src/global_changes_httpd.erl ---------------------------------------------------------------------- diff --git a/src/global_changes_httpd.erl b/src/global_changes_httpd.erl index e13b95c..af25b7c 100644 --- a/src/global_changes_httpd.erl +++ b/src/global_changes_httpd.erl @@ -39,7 +39,8 @@ handle_global_changes_req(#httpd{method='GET'}=Req) -> % Limit is handled in the changes callback, since the limit count needs to % only account for changes which happen after the filter. Limit = couch_util:get_value(limit, Options), - Options1 = lists:keydelete(limit, 1, Options), + %Options1 = lists:keydelete(limit, 1, Options), + Options1 = Options, chttpd:verify_is_server_admin(Req), Acc = #acc{ username=admin,