couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vatam...@apache.org
Subject [couchdb] 02/02: [fixup] Comment filtered replication ID change checks
Date Tue, 11 Apr 2017 01:44:48 GMT
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch 63012-scheduler
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 3eaf88f282dfb8000db3fde3b54d9cd777797b98
Author: Nick Vatamaniuc <vatamane@apache.org>
AuthorDate: Mon Apr 10 21:44:36 2017 -0400

    [fixup] Comment filtered replication ID change checks
---
 src/couch_replicator/src/couch_replicator_doc_processor.erl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/couch_replicator/src/couch_replicator_doc_processor.erl b/src/couch_replicator/src/couch_replicator_doc_processor.erl
index e6a161e..e438902 100644
--- a/src/couch_replicator/src/couch_replicator_doc_processor.erl
+++ b/src/couch_replicator/src/couch_replicator_doc_processor.erl
@@ -462,6 +462,12 @@ maybe_start_worker(Id) ->
     [#rdoc{state = scheduled, filter = Filter}] when Filter =/= user ->
         ok;
     [#rdoc{rep = Rep} = Doc] ->
+        % For any replication with a user created filter function, periodically
+        % (every `filter_backoff/0` seconds) to try to see if the user filter
+        % has changed by using a worker to check for changes. When the worker
+        % returns check if replication ID has changed. If it hasn't keep
+        % checking (spawn another worker and so on). If it has stop the job
+        % with the old ID and continue checking.
         Wait = get_worker_wait(Doc),
         Ref = make_ref(),
         true = ets:insert(?MODULE, Doc#rdoc{worker = Ref}),

-- 
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <commits@couchdb.apache.org>.

Mime
View raw message