mirror of https://github.com/citusdata/citus.git
Only delay initial connection packets
parent
667edd9194
commit
e8b4db4236
|
@ -36,7 +36,7 @@ INSERT INTO failover_to_local SELECT i, i::text FROM generate_series(0,20)i;
|
||||||
-- even if the connection establishment fails, Citus can
|
-- even if the connection establishment fails, Citus can
|
||||||
-- failover to local exection
|
-- failover to local exection
|
||||||
SET citus.node_connection_timeout TO 400;
|
SET citus.node_connection_timeout TO 400;
|
||||||
SELECT citus.mitmproxy('conn.delay(500)');
|
SELECT citus.mitmproxy('conn.connect_delay(500)');
|
||||||
mitmproxy
|
mitmproxy
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ CONTEXT: while executing command on localhost:xxxxx
|
||||||
-- if the local execution is disabled, Citus does
|
-- if the local execution is disabled, Citus does
|
||||||
-- not try to fallback to local execution
|
-- not try to fallback to local execution
|
||||||
SET citus.enable_local_execution TO false;
|
SET citus.enable_local_execution TO false;
|
||||||
SELECT citus.mitmproxy('conn.delay(500)');
|
SELECT citus.mitmproxy('conn.connect_delay(500)');
|
||||||
mitmproxy
|
mitmproxy
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ class ActionsMixin:
|
||||||
return self.next
|
return self.next
|
||||||
|
|
||||||
def connect_delay(self, timeMs):
|
def connect_delay(self, timeMs):
|
||||||
self.next = DelayHandler(self.root, timeMs)
|
self.next = ConnectDelayHandler(self.root, timeMs)
|
||||||
return self.next
|
return self.next
|
||||||
|
|
||||||
class AcceptHandler(Handler):
|
class AcceptHandler(Handler):
|
||||||
|
@ -174,8 +174,8 @@ class CancelHandler(Handler):
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
return 'done'
|
return 'done'
|
||||||
|
|
||||||
class DelayHandler(Handler):
|
class ConnectDelayHandler(Handler):
|
||||||
'Delay a packet by sleeping before deciding what to do'
|
'Delay the initial packet by sleeping before deciding what to do'
|
||||||
def __init__(self, root, timeMs):
|
def __init__(self, root, timeMs):
|
||||||
super().__init__(root)
|
super().__init__(root)
|
||||||
self.timeMs = timeMs
|
self.timeMs = timeMs
|
||||||
|
|
Loading…
Reference in New Issue