zuloohope.blogg.se

Sql balance lock
Sql balance lock







sql balance lock

Let’s first look at two examples of missing updates: It can be recovered from redolog in case of downtimeĬonsistency is guaranteed by three other features What is the isolation level of transactions? MySQL modifies the data and records the operation in memory and redolog at the same time. The persistence is guaranteed by memory + redo log. When the transaction is rolled back, the executed SQL is revoked Its changes to the data in the database are lasting, and even if the database fails, it should not have any impact on it.Ītomicity is guaranteed by the undo log, which records the log information that the transaction needs to be rolled back. Persistence: after a transaction is committed.Isolation: when accessing the database concurrently, the transactions of one user will not be disturbed by other transactions, and the database between concurrent transactions is independent.Consistency: the data is consistent before and after the transaction is executed, and the results of multiple transactions reading the same data are the same.The atomicity of transactions ensures that actions are either fully completed or completely ineffective Atomicity: transaction is the smallest execution unit and cannot be divided.Relational databases need to follow acid rules Transaction is to ensure that these two key operations either succeed or fail. In case of a sudden error between these two operations, such as the collapse of the banking system, which leads to the decrease of Xiaoming’s balance and the non increase of Xiaohong’s balance, it is wrong. If Xiaoming wants to transfer 1000 yuan to Xiaohong, the transfer will involve two key operations: reduce Xiaoming’s balance by 1000 yuan and increase Xiaohong’s balance by 1000 yuan. The most classic transaction is often cited as an example of transfer. A transaction is a logical set of operations that are either executed or not executed. The result of its execution must change the database from one consistency state to another. Transaction is an inseparable sequence of database operations and the basic unit of database concurrency control. The principle of annotation driven transactions.Propagation behavior of spring transactions.Implementation principle of spring transaction.What is the difference between redo log and binlog.Examples of dirty reading, unreal reading and non repeatable reading?.What is the isolation level of transactions?.









Sql balance lock