Skip to content
This repository has been archived by the owner on May 25, 2021. It is now read-only.

Commit

Permalink
Fix race condition by relying on admin only
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
davisp committed Aug 22, 2014
1 parent 727868f commit 5c0b30e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/global_changes_httpd.erl
Expand Up @@ -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,
Expand Down

0 comments on commit 5c0b30e

Please sign in to comment.