couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1144208 - /couchdb/trunk/src/couchdb/couch_replicator.erl
Date Fri, 08 Jul 2011 09:28:20 GMT
Author: fdmanana
Date: Fri Jul  8 09:28:20 2011
New Revision: 1144208

URL: http://svn.apache.org/viewvc?rev=1144208&view=rev
Log:
Don't block the replication supervisor for too long
    
When a replication child is started and there's no
connectivity with a remote endpoint, each request is
retried up to 10 times. The first retry is done after
250ms, the second after 500ms, the third after 1s, etc.
This implies that the replication supervisor can be
kept blocked until the replication process startup
(init gen_server callback function) is successful or
the 10 connection retries fail - therefore no other
replications can be started for this long period neither
can this replication be cancelled (by deleting the
corresponding document). This behaviour of starting
children synchronously is the only behaviour supported
by the OTP supervisor module.


Modified:
    couchdb/trunk/src/couchdb/couch_replicator.erl

Modified: couchdb/trunk/src/couchdb/couch_replicator.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_replicator.erl?rev=1144208&r1=1144207&r2=1144208&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_replicator.erl (original)
+++ couchdb/trunk/src/couchdb/couch_replicator.erl Fri Jul  8 09:28:20 2011
@@ -105,7 +105,7 @@ async_replicate(#rep{id = {BaseId, Ext},
     Target = couch_api_wrap:db_uri(Tgt),
     ChildSpec = {
         RepChildId,
-        {gen_server, start_link, [?MODULE, Rep, []]},
+        {gen_server, start_link, [?MODULE, Rep, [{timeout, 20000}]]},
         temporary,
         1,
         worker,



Mime
View raw message