predixy icon indicating copy to clipboard operation
predixy copied to clipboard

why not support keys * ?

Open jeff2088 opened this issue 5 years ago • 4 comments

why not support command “keys *” ? when I input keys * ,there is a wrong “(error) ERR unknown command 'keys'”

jeff2088 avatar Apr 23 '20 23:04 jeff2088

avoid to use "keys *"

fortrue avatar Jun 02 '20 11:06 fortrue

It's easy to support Command 'keys'. 1st In Command.cpp, add {Keys, "keys", 2, 2, Read}, in Command Command::CmdPool[AvailableCommands] 2nd In Command.h add Keys, in enum Type

arctan90 avatar Jul 22 '20 12:07 arctan90

It's easy to support Command 'keys'. 1st In Command.cpp, add {Keys, "keys", 2, 2, Read}, in Command Command::CmdPool[AvailableCommands] 2nd In Command.h add Keys, in enum Type

这样添加还是有问题的,如果是代理单个实例,可以查出所有的key,否则就不能查出所有的实例的key,比如哨兵模式下,keys *、keys ** 、keys ***等分别从不同的实例下查出keys

tiezhong2004 avatar Sep 22 '20 06:09 tiezhong2004

It's easy to support Command 'keys'. 1st In Command.cpp, add {Keys, "keys", 2, 2, Read}, in Command Command::CmdPool[AvailableCommands] 2nd In Command.h add Keys, in enum Type

这样添加还是有问题的,如果是代理单个实例,可以查出所有的key,否则就不能查出所有的实例的key,比如哨兵模式下,keys *、keys ** 、keys ***等分别从不同的实例下查出keys

有没有sentinel倒不是关键,主要看redis实例之间是怎么配的。如果是1主2副本的模式就不会存在这种问题,如果是多主模式就要遍历master节点了。这个predixy框架还是有很多地方需要打磨的,不过作者好像不太感兴趣,我打算自己搞了。

arctan90 avatar Sep 25 '20 06:09 arctan90