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.

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 this pull request may close these issues.

1 participant