couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [03/10] git commit: Fix changes API usage for new pending values
Date Thu, 07 Aug 2014 16:01:05 GMT
Fix changes API usage for new pending values

BugzId: 26119


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/18956307
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/tree/18956307
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/diff/18956307

Branch: refs/heads/windsor-merge
Commit: 1895630795efdc6091f0b5b805cd630e442493bf
Parents: 3b5726f
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Thu Dec 12 12:33:50 2013 -0600
Committer: Robert Newson <rnewson@apache.org>
Committed: Thu Aug 7 17:00:36 2014 +0100

----------------------------------------------------------------------
 src/global_changes_httpd.erl | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/blob/18956307/src/global_changes_httpd.erl
----------------------------------------------------------------------
diff --git a/src/global_changes_httpd.erl b/src/global_changes_httpd.erl
index 643fb84..ed39cbe 100644
--- a/src/global_changes_httpd.erl
+++ b/src/global_changes_httpd.erl
@@ -100,6 +100,9 @@ changes_callback({change, Change0}, #acc{feed="continuous"}=Acc) ->
             {ok, Acc#acc{resp=Resp1, last_data_sent_time=os:timestamp()}}
     end;
 changes_callback({stop, EndSeq}, #acc{feed="continuous"}=Acc) ->
+    % Temporary upgrade clause - Case 24236
+    changes_callback({stop, EndSeq, null}, Acc);
+changes_callback({stop, EndSeq, _Pending}, #acc{feed="continuous"}=Acc) ->
     #acc{resp=Resp} = Acc,
     {ok, Resp1} = chttpd:send_delayed_chunk(Resp,
         [?JSON_ENCODE({[{<<"last_seq">>, EndSeq}]}) | "\n"]),
@@ -135,6 +138,9 @@ changes_callback({change, Change0}, Acc) ->
             {ok, Acc1}
     end;
 changes_callback({stop, EndSeq}, Acc) ->
+    % Temporary upgrade clause - Case 24236
+    changes_callback({stop, EndSeq, null}, Acc);
+changes_callback({stop, EndSeq, _Pending}, Acc) ->
     #acc{resp=Resp} = Acc,
     {ok, Resp1} = chttpd:send_delayed_chunk(Resp,
         ["\n],\n\"last_seq\":", ?JSON_ENCODE(EndSeq), "}\n"]),


Mime
View raw message