Comment 1 for bug 1359018

Revision history for this message
Takashi Kajinami (kajinamit) wrote :

Here I show detailed description about this problem.

_repl_to_node checks timeout in _http_connect function. (swift.common.db_replicator l373)

    def _repl_to_node(self, node, broker, partition, info):
        ...
        with ConnectionTimeout(self.conn_timeout):
            http = self._http_connect(node, partition, broker.db_file)

_http_connect creates and returns ReplConecction class. (swift.common.db_replicator l338)
It never calls "connect".

    def _http_connect(self, node, partition, db_file):
        ...
        return ReplConnection(node, partition,
                              os.path.basename(db_file).split('.', 1)[0],
                              self.logger)

ReplConnection doesn't create connection in __init__. (swift.common.db_replicator l115)

    def __init__(self, node, partition, hash_, logger):
        ...
        self.logger = logger
        self.node = node
        host = "%s:%s" % (node['replication_ip'], node['replication_port'])
        BufferedHTTPConnection.__init__(self, host)

        self.path = '/%s/%s/%s' % (node['device'], partition, hash_)