couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject fabric commit: updated refs/heads/master to c7214fd
Date Wed, 07 Sep 2016 18:23:03 GMT
Repository: couchdb-fabric
Updated Branches:
  refs/heads/master 78eb096da -> c7214fd2f


End continuous changes feeds cleanly if database is deleted

COUCHDB-3132


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/c7214fd2
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/c7214fd2
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/c7214fd2

Branch: refs/heads/master
Commit: c7214fd2fef2fdbbf47964f6017c71ec8e8196ca
Parents: 78eb096
Author: Robert Newson <rnewson@apache.org>
Authored: Wed Sep 7 18:56:14 2016 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Wed Sep 7 18:56:14 2016 +0100

----------------------------------------------------------------------
 src/fabric_db_update_listener.erl | 4 ++--
 src/fabric_view_changes.erl       | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/c7214fd2/src/fabric_db_update_listener.erl
----------------------------------------------------------------------
diff --git a/src/fabric_db_update_listener.erl b/src/fabric_db_update_listener.erl
index 733be89..074ec53 100644
--- a/src/fabric_db_update_listener.erl
+++ b/src/fabric_db_update_listener.erl
@@ -122,8 +122,8 @@ wait_db_updated({Pid, Ref}) ->
         {state, Pid, State} ->
             erlang:demonitor(MonRef, [flush]),
             State;
-        {'DOWN', MonRef, process, Pid, Reason} ->
-            throw({changes_feed_died, Reason})
+        {'DOWN', MonRef, process, Pid, _Reason} ->
+            changes_feed_died
     after 300000 ->
         ?MODULE:wait_db_updated({Pid, Ref})
     end.

http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/c7214fd2/src/fabric_view_changes.erl
----------------------------------------------------------------------
diff --git a/src/fabric_view_changes.erl b/src/fabric_view_changes.erl
index 7e329ac..8f7a6f1 100644
--- a/src/fabric_view_changes.erl
+++ b/src/fabric_view_changes.erl
@@ -103,6 +103,8 @@ keep_sending_changes(DbName, Args, Callback, Seqs, AccIn, Timeout, UpListen,
T0)
             list_to_integer(MaxStr)
         end,
         case {Heartbeat, AccumulatedTime > Max, WaitForUpdate} of
+        {_, _, changes_feed_died} ->
+            Callback({stop, LastSeq, pending_count(Offset)}, AccOut);
         {undefined, _, timeout} ->
             Callback({stop, LastSeq, pending_count(Offset)}, AccOut);
         {_, true, timeout} ->


Mime
View raw message