Skip to content

Have get_primaries and related RedisCluster methods throw an error if the cluster isn't initialized#3040

Open
eoghanmurray wants to merge 4 commits intoredis:masterfrom
eoghanmurray:get_primaries-throw-error
Open

Have get_primaries and related RedisCluster methods throw an error if the cluster isn't initialized#3040
eoghanmurray wants to merge 4 commits intoredis:masterfrom
eoghanmurray:get_primaries-throw-error

Conversation

@eoghanmurray
Copy link

Description of change

See #3032

@eoghanmurray eoghanmurray changed the title Get primaries throw error Have get_primaries and related RedisCluster methods throw an error if the cluster isn't initialized Nov 13, 2023
@eoghanmurray
Copy link
Author

eoghanmurray commented Nov 13, 2023

I was thinking of moving all the checks into NodesManager but nodes_cache is accessed directly from outside of that.

The self.nodes_cache dictionary initialization to the empty dictionary could be changed to None to ensure that any code throws an error trying to access that. The typing system put me off trying that approach.

@github-actions
Copy link
Contributor

This pull request has been automatically marked as stale due to inactivity.
It will be closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the stale label Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant