In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The editor will share with you whether rollback can be supported in redis. I hope you will gain a lot after reading this article. Let's discuss it together.
If you have a background in relational databases, you will find the fact that although Redis commands may fail during a transaction, Redis will still execute the remaining commands in the transaction instead of performing a rollback operation, which you may find strange.
However, this behavior also has its reasonableness:
Only if there is a syntax error in the called Redis command will the command fail (Redis can find such a problem during putting this command in the transaction queue), or perform an operation on a key that does not match its data type: in fact, this means that only a program error can cause Redis command execution to fail, which is likely to be found during program development and is rarely found in a production environment.
Redis has simplified functionality within the system to ensure faster operation, because Redis does not require the ability to roll back transactions.
A common objection to this behavior of Redis transactions is that the program may be bug. However, you should note that transaction rollback does not resolve any program errors.
For example, if a query increments the value of a key by 2 instead of 1, or by the wrong key, then the transaction rollback mechanism cannot solve these program problems. Note that no one can solve the programmer's own errors, which can cause Redis command execution to fail. Because these program errors are unlikely to enter the production environment, we choose a simpler and faster method when developing Redis, without the function of error rollback.
In short, since there is no mechanism to avoid errors made by programmers themselves, and such errors do not usually occur in a production environment, Redis opts for a simpler and faster rollback-free approach to transactions.
After reading this article, I believe you have a certain understanding of whether rollback can be supported in redis. If you want to know more about it, welcome to follow the industry information channel. Thank you for your reading!
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.