In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Today, I would like to talk to you about the sentinel drift caused by redis flushdb, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following content for you. I hope you can get something from this article.
Found that the amount of redis data is too large, the data is not normal, and R & D discussed the use of flushall to clean up. After execution on the master node, it is found that the master drifts to other nodes, and then the data is synchronized from other nodes. So execute flushall on three machines at the same time, and then check and find that the data has been cleaned up and the state of the redis cluster is normal.
According to the analysis, due to the large amount of data, the time of flushall takes nearly 6 seconds, and it is blocked. Because the sentry cannot connect in 3s, the master node will be re-elected, resulting in master drift.
Solution: 1. Execute flushall operation on three machines at the same time.
2. Stop the Sentinel, perform flushall on the master node, and then start the Sentinel
3. Restart redis in turn. After shutting down, you need to clean up rdb data. (this operation has not been performed, there is also a problem of data writeback, and it may be risky to stop the sentinel to cooperate.)
After reading the above, do you have any further understanding of the sentinel drift caused by redis flushdb? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
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.