In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Source of problem
This problem may seem strange, but many redis clusters have a unified entry, which acts as a proxy compatible with redis commands. Generally, it is forbidden to use keys commands to obtain key information out of new considerations, but keys can be replaced by scan commands.
two。 The method of using keys
127.0.0.1 a8e620b9-e52e-3498 6379 > KEYS * 1) "_ kombu.binding.test_queue" 2) "a8e620b9-e52e-3498-8a1c-448f35783058" 3) "_ kombu.binding.celery"
3. The method of using scan
127.0.0.1 DBSIZE 6379 > DBSIZE (integer) 3127.0.1 SCAN 0 MATCH * COUNT 31) "5" 2) 1) "a8e620b9-e52e-3498-8a1c-448f35783058" 2) "_ kombu.binding.test_queue" 3) "_ kombu.binding.celery"
Simple explanation
The SCAN command (and the associated SSCAN/HSCAN/ZSCAN, for SET/HASH/ZSET, respectively) is used to incrementally traverse the elements in a collection. Because of its incremental nature (only a small number of elements are returned per use), it can be used instead of KEYS or SMEMBERS commands in production environments (KEYS or SMEMBERS commands may block redis because too many elements are returned)
Therefore, even if the redis service supports the keys command in a production environment, scan should be used instead.
Reference:
1. Https://groups.google.com/forum/#!topic/redis-db/zZeI_PjHF_M
2. Https://redis.io/commands/scan
Summary
The above is the editor introduced to you Redis does not use the keys command to obtain key information related knowledge, hope to help you, if you have any questions welcome to leave a message for me, the editor will reply to you in time!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.