couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1100728 - /couchdb/trunk/src/couchdb/couch_replicator.erl
Date Sun, 08 May 2011 12:52:14 GMT
Author: fdmanana
Date: Sun May  8 12:52:14 2011
New Revision: 1100728

URL: http://svn.apache.org/viewvc?rev=1100728&view=rev
Log:
Replicator: ensure each worker gets at least 1 connection

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=1100728&r1=1100727&r2=1100728&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_replicator.erl (original)
+++ couchdb/trunk/src/couchdb/couch_replicator.erl Sun May  8 12:52:14 2011
@@ -238,7 +238,8 @@ do_init(#rep{options = Options, id = {Ba
     % MissingRevsQueue and copy them from the source to the target database.
     MaxHttpConns = get_value(http_connections, Options),
     HttpPipeSize = get_value(http_pipeline_size, Options),
-    MaxParallelConns = (MaxHttpConns * HttpPipeSize) div CopiersCount,
+    MaxParallelConns = lists:max(
+        [(MaxHttpConns * HttpPipeSize) div CopiersCount, 1]),
     Workers = lists:map(
         fun(_) ->
             {ok, Pid} = couch_replicator_doc_copier:start_link(



Mime
View raw message