Pessimistic Distributed Transaction

less than 1 minute read

Pessimistic distributed transaction will use the following concepts to achieve ACID(Atomic, Consistency, Isolation, Durable).

  1. Two phase locking
  2. 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.