In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
What are the problems caused by database concurrent operations? In view of this problem, this article gives the corresponding analysis and answers, hoping to help more friends who want to solve this problem to find a more simple and feasible way.
The concurrent operation of the database usually leads to the problems of lost updates, inconsistent analysis and the readout of "dirty data".
Data inconsistency caused by concurrent operations
1. Lost modification (Lost Update)
2. Non-repeatable (Non-repeatable Read)
3. Phantom Read
4. Read "dirty" data (Dirty Read)
Let's take a look at it separately:
Lost modification: two transactions, Tmur1 and Tmur2, read the same data and modified it. The commit result of Tmur2 destroyed the result of Tmur1 submission, resulting in the modification of Tmur1 being lost. (modify-modify conflict)
Non-repeatable reading: transaction 1 reads a certain data and transaction 2 modifies it; when transaction 1 reads the data again, it gets a different value from the previous one (read-update conflict)
Illusion: transaction Tmur1 reads some data records from the database according to certain conditions, and transaction Tmur2 deletes (inserts) some of them. When Tmuri 1 reads data under the same conditions again, it is found that some records mysteriously disappear (appear). (read-insert / delete conflicts)
Dirty data: transaction Tmuri 1 modifies a certain data and writes it back to disk; after transaction Tmur2 reads the same data, Tmur1 is revoked for some reason. When Tmer1 restores the original value of the modified data, the data read by Tmuri 2 is inconsistent with the data in the database. The data read by Tmur2 is "dirty" data, that is, incorrect data (correction-read conflict)
Data inconsistency: because concurrent operations break the isolation of transactions
The purpose of concurrency control
It is necessary to schedule concurrent operations in a correct way, so that the execution of one user transaction is not disturbed by other transactions, so as to avoid data inconsistency.
On the database concurrent operations will bring problems to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.