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_)
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): ut(self. conn_timeout) : connect( node, partition, broker.db_file)
...
with ConnectionTimeo
http = self._http_
_http_connect creates and returns ReplConecction class. (swift. common. db_replicator l338)
It never calls "connect".
def _http_connect(self, node, partition, db_file): node, partition,
os.path. basename( db_file) .split( '.', 1)[0],
self. logger)
...
return ReplConnection(
ReplConnection doesn't create connection in __init__. (swift. common. db_replicator l115)
def __init__(self, node, partition, hash_, logger): replication_ ip'], node['replicati on_port' ])
BufferedHTTPCo nnection. __init_ _(self, host)
...
self.logger = logger
self.node = node
host = "%s:%s" % (node['
self.path = '/%s/%s/%s' % (node['device'], partition, hash_)