dirty read, non-repeatable read, phantom read

dirty read, non-repeatable read, phantom read

 

 

  • Dirty Read Dirty read means that one transaction reads uncommitted data of another transaction, and this data may be rolled back.
  • Unrepeatable Read Unrepeatable read means that, in a database access, two identical queries within a transaction return different data. This is due to commits modified by other transactions in the system at query time. For example, a query is executed twice in transaction B. When the first execution is completed, transaction A has modified its data. When querying again in transaction B, the data has changed
  • Phantom read Phantom read refers to a phenomenon that occurs when a transaction is not executed independently. For example, the first transaction modifies the data in a table, and this modification involves all data rows in the table. At the same time, the second transaction also modifies the data in this table by inserting a new row of data into the table. Then, it will happen later that the user who operates the first transaction finds that there are no modified data rows in the table, as if a hallucination occurred.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326440526&siteId=291194637