Pessimistic Distributed Transaction
Pessimistic distributed transaction will use the following concepts to achieve ACID(Atomic, Consistency, Isolation, Durable).
- Two phase locking
- Two phase commits
Two phase locking
- Lock object before using it
- Hold the lock until it finished the transaction
Two phase commits
- Prepare commit will log all required modification and changes in write ahead logs.
- Perform commit will apply all changes written in the write ahead log to the database.