Skip to content

Commit b64ada6

Browse files
committed
Remove timeouts introduced in ARD 006
Reverts big parts of #474
1 parent 75da808 commit b64ada6

File tree

6 files changed

+3
-345
lines changed

6 files changed

+3
-345
lines changed

nutkit/frontend/driver.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ class Driver:
66
def __init__(self, backend, uri, auth_token, user_agent=None,
77
resolver_fn=None, domain_name_resolver_fn=None,
88
connection_timeout_ms=None, fetch_size=None,
9-
max_tx_retry_time_ms=None, session_connection_timeout_ms=None,
10-
update_routing_table_timeout_ms=None, encrypted=None,
9+
max_tx_retry_time_ms=None, encrypted=None,
1110
trusted_certificates=None, liveness_check_timeout_ms=None,
1211
max_connection_pool_size=None,
1312
connection_acquisition_timeout_ms=None):
@@ -19,8 +18,6 @@ def __init__(self, backend, uri, auth_token, user_agent=None,
1918
resolverRegistered=resolver_fn is not None,
2019
domainNameResolverRegistered=domain_name_resolver_fn is not None,
2120
connectionTimeoutMs=connection_timeout_ms,
22-
sessionConnectionTimeoutMs=session_connection_timeout_ms,
23-
updateRoutingTableTimeoutMs=update_routing_table_timeout_ms,
2421
fetchSize=fetch_size, maxTxRetryTimeMs=max_tx_retry_time_ms,
2522
encrypted=encrypted, trustedCertificates=trusted_certificates,
2623
liveness_check_timeout_ms=liveness_check_timeout_ms,

nutkit/protocol/feature.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,6 @@ class Feature(Enum):
4040
# If there are more than records, the driver emits a warning.
4141
# This method is supposed to always exhaust the result stream.
4242
API_RESULT_SINGLE_OPTIONAL = "Feature:API:Result.SingleOptional"
43-
# The driver offers a configuration option to limit time it spends at most,
44-
# trying to acquire a usable read/write connection for any session.
45-
# The connection acquisition timeout must account for the whole acquisition
46-
# execution time, whether a new connection is created, an idle connection
47-
# is picked up instead, we need to wait until the full pool depletes, or
48-
# a routing table must be fetched.
49-
API_SESSION_CONNECTION_TIMEOUT = "Feature:API:SessionConnectionTimeout"
5043
# The driver implements explicit configuration options for SSL.
5144
# - enable / disable SSL
5245
# - verify signature against system store / custom cert / not at all
@@ -60,9 +53,6 @@ class Feature(Enum):
6053
API_TYPE_SPATIAL = "Feature:API:Type.Spatial"
6154
# The driver supports sending and receiving temporal data types.
6255
API_TYPE_TEMPORAL = "Feature:API:Type.Temporal"
63-
# The driver offers a configuration option to limit time it spends at most,
64-
# trying to update the routing table whenever needed.
65-
API_UPDATE_ROUTING_TABLE_TIMEOUT = "Feature:API:UpdateRoutingTableTimeout"
6656
# The driver supports single-sign-on (SSO) by providing a bearer auth token
6757
# API.
6858
AUTH_BEARER = "Feature:Auth:Bearer"

nutkit/protocol/requests.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ class NewDriver:
6868
def __init__(
6969
self, uri, authToken, userAgent=None, resolverRegistered=False,
7070
domainNameResolverRegistered=False, connectionTimeoutMs=None,
71-
sessionConnectionTimeoutMs=None, updateRoutingTableTimeoutMs=None,
7271
fetchSize=None, maxTxRetryTimeMs=None, encrypted=None,
7372
trustedCertificates=None, liveness_check_timeout_ms=None,
7473
max_connection_pool_size=None,
@@ -83,8 +82,6 @@ def __init__(
8382
self.resolverRegistered = resolverRegistered
8483
self.domainNameResolverRegistered = domainNameResolverRegistered
8584
self.connectionTimeoutMs = connectionTimeoutMs
86-
self.sessionConnectionTimeoutMs = sessionConnectionTimeoutMs
87-
self.updateRoutingTableTimeoutMs = updateRoutingTableTimeoutMs
8885
self.fetchSize = fetchSize
8986
self.maxTxRetryTimeMs = maxTxRetryTimeMs
9087
self.livenessCheckTimeoutMs = liveness_check_timeout_ms

tests/stub/driver_parameters/test_max_connection_pool_size.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ def _open_driver(self, max_pool_size=None):
4848
types.Feature.API_CONNECTION_ACQUISITION_TIMEOUT
4949
):
5050
kwargs["connection_acquisition_timeout_ms"] = 500
51-
if self.driver_supports_features(
52-
types.Feature.API_SESSION_CONNECTION_TIMEOUT
53-
):
54-
kwargs["session_connection_timeout_ms"] = 1000
5551
if max_pool_size is not None:
5652
kwargs["max_connection_pool_size"] = max_pool_size
5753
auth = types.AuthorizationToken("basic", principal="neo4j",
@@ -61,12 +57,8 @@ def _open_driver(self, max_pool_size=None):
6157

6258
@contextmanager
6359
def _backend_timeout_adjustment(self):
64-
if any(
65-
self.driver_supports_features(feature)
66-
for feature in (
67-
types.Feature.API_CONNECTION_ACQUISITION_TIMEOUT,
68-
types.Feature.API_SESSION_CONNECTION_TIMEOUT,
69-
)
60+
if self.driver_supports_features(
61+
types.Feature.API_CONNECTION_ACQUISITION_TIMEOUT
7062
):
7163
yield
7264
else:

tests/stub/driver_parameters/test_session_connection_timeout.py

Lines changed: 0 additions & 175 deletions
This file was deleted.

0 commit comments

Comments
 (0)