From bc248ed00bae2b181958c9dead036fbcfce17e2e Mon Sep 17 00:00:00 2001 From: Vitalii Gridnev Date: Thu, 21 Sep 2023 00:06:04 +0300 Subject: [PATCH 1/3] fix issue with endpoint search --- ydb/pool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ydb/pool.py b/ydb/pool.py index e0bf2f15..1f33cf8a 100644 --- a/ydb/pool.py +++ b/ydb/pool.py @@ -129,7 +129,7 @@ def get(self, preferred_endpoint=None) -> Connection: return self.connections_by_node_id[preferred_endpoint.node_id] if preferred_endpoint is not None and preferred_endpoint.endpoint in self.connections: - return self.connections[preferred_endpoint] + return self.connections[preferred_endpoint.endpoint] for conn_lst in self.conn_lst_order: try: From fb563b7da2506c6fb32fa52d2f693e0cf967e0af Mon Sep 17 00:00:00 2001 From: Vitalii Gridnev Date: Thu, 21 Sep 2023 00:08:07 +0300 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25b44be7..8b3d478e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 3.5.1 ## +* Fixed access to connection if connection cannot be found by node id + ## 3.5.0 ## * Added functions for check column table type table of any type of scheme entry From 6709a63f9dab498feac4a38dcf2d21c9fec3ae91 Mon Sep 17 00:00:00 2001 From: Vitalii Gridnev Date: Thu, 21 Sep 2023 00:08:43 +0300 Subject: [PATCH 3/3] Update pool.py --- ydb/aio/pool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ydb/aio/pool.py b/ydb/aio/pool.py index 6e95dd6f..fd4e8016 100644 --- a/ydb/aio/pool.py +++ b/ydb/aio/pool.py @@ -34,7 +34,7 @@ async def get(self, preferred_endpoint=None, fast_fail=False, wait_timeout=10): return self.connections_by_node_id[preferred_endpoint.node_id] if preferred_endpoint is not None and preferred_endpoint.endpoint in self.connections: - return self.connections[preferred_endpoint] + return self.connections[preferred_endpoint.endpoint] for conn_lst in self.conn_lst_order: try: