Skip to content

RuntimeError in valkey.asyncio.cluster.NodesManager.initialize() #181

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

Open
jakob-keller opened this issue Mar 18, 2025 · 2 comments · May be fixed by #184
Open

RuntimeError in valkey.asyncio.cluster.NodesManager.initialize() #181

jakob-keller opened this issue Mar 18, 2025 · 2 comments · May be fixed by #184
Assignees

Comments

@jakob-keller
Copy link

I've noticed RuntimeError: dictionary changed size during iteration being raised in valkey.asyncio.cluster.NodesManager.initialize()

for startup_node in self.startup_nodes.values():

I believe this can be triggered during error handling in:

self.nodes_manager.startup_nodes.pop(target_node.name, None)

A quick fix might be to wrap self.startup_nodes.values() in a tuple.

Should I prepare a PR?

@mkmkme
Copy link
Collaborator

mkmkme commented Mar 25, 2025

Hey @jakob-keller !

Thanks for your contribution! I'll look into this issue as soon as I can. If you have a vision of how to fix this, please feel free to create a PR! I'll happily review it :)

@mkmkme mkmkme self-assigned this Mar 25, 2025
jakob-keller added a commit to jakob-keller/valkey-py that referenced this issue Mar 25, 2025
@jakob-keller
Copy link
Author

If you have a vision of how to fix this, please feel free to create a PR! I'll happily review it :)

The fix is trivial: #184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants