Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: TOOLS-2976 manage truncate fails when set DNE #312

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/live_cluster/client/assocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ async def _create_socket_for_addrinfo(self, addrinfo):

"""We are creating our own socket, optionally wrapping it with an SSL.Context (not the same as ssl.SSLContext)
to get an SSL.Connection (same interface as a socket.socket). Further up the stack we pass this socket to asyncio.open_connection
to create streams. The perfered way of creating a socket would be to
to create streams. The preferred way of creating a socket would be to
allow asyncio create the socket (ssl or not) by passing the ssl_context (or None) to asyncio.open_connection. However, ssl_context must
be an instance of ssl.SSLContext, which is not compatible with SSL.Context which is what we use. SSL.Context enables a higher level
of control over certificate verification which we need (see ./ssl_context.py). Another solution might be to create a custom implementation
of he asyncio Transport that uses pyOpenSSL.SSL.Context (or use https://github.com/horazont/aioopenssl) but that would be a
of the asyncio Transport that uses pyOpenSSL.SSL.Context (or use https://github.com/horazont/aioopenssl) but that would be a
considerable amount of work.
"""
await asyncio.wait_for(
Expand Down
2 changes: 1 addition & 1 deletion lib/live_cluster/client/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ async def info_all_namespace_statistics(self):
async def info_set_statistics(self, namespace, set_):
set_stat = await self._info("sets/{}/{}".format(namespace, set_))

if set_stat[-1] == ";":
if set_stat and set_stat[-1] == ";":
set_stat = client_util.info_colon_to_dict(set_stat[0:-1])
else:
set_stat = client_util.info_colon_to_dict(set_stat)
Expand Down
Loading