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

"Unclosed ClusterNode object" with localhost #3163

Open
dranikpg opened this issue Feb 27, 2024 · 0 comments
Open

"Unclosed ClusterNode object" with localhost #3163

dranikpg opened this issue Feb 27, 2024 · 0 comments

Comments

@dranikpg
Copy link

dranikpg commented Feb 27, 2024

Version: 5.0.1
Platform: Python 3.10.12 on Ubuntu
Description:

Cluster nodes are leaked when "localhost" is used in the host with multiple range slots. This happens because they're cached by node.name

tmp_nodes_cache[target_node.name] = target_node

But queried by get_node_name

target_node = tmp_nodes_cache.get(get_node_name(host, port))

The difference between those two is that the former removes "localhost"

if host == "localhost":

So we look for localhost and insert 127.0.0.1, evicting the previous entry

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

No branches or pull requests

1 participant