nickva commented on a change in pull request #470: Scheduling Replicator
URL: https://github.com/apache/couchdb/pull/470#discussion_r110556709
 
 

 ##########
 File path: src/couch_replicator/src/couch_replicator_doc_processor_worker.erl
 ##########
 @@ -0,0 +1,276 @@
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License. You may obtain a copy of
+% the License at
+%
+%   http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+-module(couch_replicator_doc_processor_worker).
+
+-export([
+    spawn_worker/4
+]).
+
+-include("couch_replicator.hrl").
+
+-import(couch_replicator_utils, [
+    pp_rep_id/1
+]).
+
+-define(WORKER_TIMEOUT_MSEC, 61000).
 
 Review comment:
   Because 30 seconds was a timeout for requests and so after worker is 
spawned, we'd want the worker to get a chance to make a few requests (maybe one 
failing one and a retry) and then fail with its own error (timeout, network 
error), which would be more specific and informative, before it simply gets 
killed because of the timeout here. That is, if all  fails and the worker is 
actually blocked then 61 sec is a safety net to brutally kill the worker so 
doesn't end up hung forever.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to