You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
About command "keys * " in cluster--How can I get all keys in redis cluster? #1962
How can I get all keys in redis cluster?
When I use keys * ,I get a result of the redis-server I have connected:
[admin@localhost src]$ ./redis-cli -c -p 7000
127.0.0.1:7000> keys *
(empty list or set)
127.0.0.1:7000> get foo
-> Redirected to slot [12182] located at 127.0.0.1:7002
"bar"
127.0.0.1:7002>
Reacted by Larry Battle at Work, TheOneWhoShouldNotBeNamed, xubigshu, xtianus79, Amit Kumar, Alexey Sh, mayurgoenka and Li
You can't. You would have to ask each node seperately. But please avoid KEYS * whenever possible. If you really must iterate the whole keyspace of an instance use SCAN.
Btw, this issue tracker should be used for bugs or improvements to the Redis server. For questions like your's please ask on the mailing list or in the irc channel.
Reacted by coverboy, Vinícius Dantas, xtianus79, Marcela Rodriguez, Artemy, eeliu and 256051
Newer versions of Redis include more cluster support in the cli. To answer the OP's question, you can do the following to have a command, such as KEYS execute on each node:
The cli also supports a --scan mode, for SCANning keys instead if using KEYS. That said, I don't think that --scan and --cluster modes play nicely together.
Activity
badboy commentedon Aug 25, 2014
You can't. You would have to ask each node seperately. But please avoid
KEYS *whenever possible. If you really must iterate the whole keyspace of an instance use SCAN.Btw, this issue tracker should be used for bugs or improvements to the Redis server. For questions like your's please ask on the mailing list or in the irc channel.
Long80A commentedon Aug 26, 2014
Thank you for your answer.
xtianus79 commentedon Dec 19, 2019
@badboy this should be put into the documentation but thank you for the answer @mattsta
badboy commentedon Dec 20, 2019
Then do that ;)
I'm not working on Redis anymore.
xtianus79 commentedon Dec 22, 2019
lol @badboy, did you ever? I don't know that. but also, is their page a wiki where anyone can edit it?
itamarhaber commentedon Dec 23, 2019
The docs are open at https://github.com/antirez/redis-doc, and this could belong in 'topics/cluster-tutorial.md'.
Newer versions of Redis include more cluster support in the cli. To answer the OP's question, you can do the following to have a command, such as
KEYSexecute on each node:The cli also supports a
--scanmode, forSCANning keys instead if usingKEYS. That said, I don't think that--scanand--clustermodes play nicely together.Update RedisTimeSeries module to v8.9.80
Update RedisTimeSeries module to v8.9.80 (#15336)