In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Today, in the project, we use the hash structure of Redis to save some commodity data, which is put in according to the commodity id from small to large. Then now if you want to hgetAll it out, you can also take it out in id order, but it is found that the result is not like this, and the output is out of order.
With the decision to see why in the end, found something fishy.
It is pointed out in Design and implementation of REDIS
When creating a blank hash table, the program uses REDIS_ENCODING_ZIPLIST encoding by default, and the program changes the encoding from REDIS_ENCODING_ZIPLIST to REDIS_ENCODING_HT when any of the following conditions are met:
The length of a key or value in the hash table is greater than server.hash_max_ziplist_value (the default is 64).
The number of nodes in the compressed list is greater than server.hash_max_ziplist_entries (default is 512).
Then I looked at my own data and found that the length of the value was greater than 64, so I adopted the coding format of hashtable. It's disordered.
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.