You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2014/08/01 11:11:58 UTC

[10/50] fabric commit: updated refs/heads/windsor-merge-121 to 79e6e2f

Gracefully terminate continuous changes feeds

When maintenance_mode is set to "true" or "nolb", end all active continuous
changes feeds gracefully with a last_seq chunk and clean TCP
termination.

BugzID: 21618


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

Branch: refs/heads/windsor-merge-121
Commit: a698d48c3ebe73fdb64977bcae41f4ae2de4094b
Parents: bef303b
Author: Robert Newson <ro...@cloudant.com>
Authored: Mon Aug 12 02:12:28 2013 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Thu Jul 31 10:54:33 2014 +0100

----------------------------------------------------------------------
 src/fabric_view_changes.erl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/a698d48c/src/fabric_view_changes.erl
----------------------------------------------------------------------
diff --git a/src/fabric_view_changes.erl b/src/fabric_view_changes.erl
index ddfe45f..fb8303f 100644
--- a/src/fabric_view_changes.erl
+++ b/src/fabric_view_changes.erl
@@ -76,7 +76,9 @@ keep_sending_changes(DbName, Args, Callback, Seqs, AccIn, Timeout, UpListen, T0)
     {ok, Collector} = send_changes(DbName, Args, Callback, Seqs, AccIn, Timeout),
     #collector{limit=Limit2, counters=NewSeqs, user_acc=AccOut} = Collector,
     LastSeq = pack_seqs(NewSeqs),
-    if Limit > Limit2, Feed == "longpoll" ->
+    MaintenanceMode = config:get("cloudant", "maintenance_mode"),
+    if Limit > Limit2, Feed == "longpoll";
+      MaintenanceMode == "true"; MaintenanceMode == "nolb" ->
         Callback({stop, LastSeq}, AccOut);
     true ->
         WaitForUpdate = wait_db_updated(UpListen),