Star

Distributed System-ACID

CMU-95702分布式系统 ACID概念总结

  • ACID Transactions:
    • Atomic: All or nothing. No intermediate states are visible. No possibility that only part of the transaction ran. If a transaction fails or aborts prior to committing, the TP system will undo the effects of any updates (will recover). We either commit or abort the entire process. Checkpointing and Logging and recoverable objects can be used to ensure a transaction is atomic with respect to failures.
    • Consistent: system invariants preserved, e.g., if there were n dollars in a bank before a transfer transaction then there will be n dollars in the bank after the transfer. This is largely in the hands of the application programmer.
    • Isolated: Two transactions do not interfere with each other. They appear as serial executions. This is the case even though transactions may run concurrently. Locking is often used to prevent one transaction from interfering with another.
    • Durable: The commit causes a permanent change to stable storage. This property may be obtained with log-based recovery algorithms. If there has been a commit but updates have not yet been a commit but updates have not yet been completed due to a crash, the logs will hold the necessary information on recovery.