In the context of distributed system, transaction basically means a series of RPC operations executed by client. The idea here is similar to the transaction in RDBMS.
For each transaction, it either commit (update server) or has no effect. Each of them should be “all or nothing” and “indivisible” (atomic).
Here we bring the ACID principles in RDBMS back for review:
- Atomicity: all or nothing
- Consistency: start and end in consistent state
- Isolation: indivisible, which means no non-final result is visible to other transactions
- Durability: If transaction completed successfully, its effect is saved permanently.
Serially equivalent: two transaction can interweave and has same result as they are conducted serially.
At commit point of transaction T, check for all other overlapped transaction, if not serially equivalent (serializable), then abort T and roll back any writes that T did to server.
- 本文作者: Yu Wan
- 本文链接: https://cyanh1ll.github.io/2021/01/15/transaction/
- 版权声明: CYANH1LL