Skip to content

Commit

Permalink
Merge pull request #353 from gridnevvvit/gridnevvvit-patch-1 Fixed ac…
Browse files Browse the repository at this point in the history
…cess to connection if connection cannot be found by node id
  • Loading branch information
rekby authored Sep 21, 2023
2 parents f90cbcc + 6709a63 commit 8938db2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion ydb/aio/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion ydb/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8938db2

Please sign in to comment.