You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2017/04/11 01:44:48 UTC
[couchdb] 02/02: [fixup] Comment filtered replication ID change
checks
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 <va...@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" <co...@couchdb.apache.org>.