lanto03 / couchdb-python

Automatically exported from code.google.com/p/couchdb-python
Other
0 stars 0 forks source link

replication_helper should pull from source instead of pushing to each target #46

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
pull-based replication results is a faster, more efficient process because of 
request pipelining.  
Here's a patch:

--- a/couchdb/tools/replication_helper.py
+++ b/couchdb/tools/replication_helper.py
@@ -63,9 +63,9 @@ class ReplicationHelper(object):

         # send replication request to target server
         for target_server in self.args.target_servers: 
-            body['target'] = self.concat_uri(target_server, database)
+            body['target'] = database
             self.http.request(
-                self.concat_uri(self.args.source_server, '_replicate'), 
+                self.concat_uri(target_server, '_replicate'), 
                 'POST', 
                 body=json.dumps(body, ensure_ascii=False))

Original issue reported on code.google.com by adam.kocoloski@gmail.com on 8 Jan 2009 at 7:16

GoogleCodeExporter commented 8 years ago
This issue was closed by r179.

Original comment by cmlenz on 2 Jul 2009 at 1:06

GoogleCodeExporter commented 8 years ago
This issue was closed by revision f6c3439023.

Original comment by djc.ochtman on 3 Dec 2009 at 9:51