Back to course home
0% completed
Optimistic vs. Pessimistic Concurrency Control
Optimistic Concurrency Control (OCC)
OCC assumes that conflicts are rare and allows transactions to execute without restrictions until they are ready to commit. At the commit stage, the system checks for conflicts.
How OCC Works
- Transaction Execution: A transaction reads data and makes changes locally without acquiring locks.
- Validation Phase: Before committing, the database checks if any conflicts occurred (e.g., if another transaction modified the same data).
- Commit or Rollback:
- If no conflicts are detected, the transaction commits.
.....
.....
.....
Like the course? Get enrolled and start learning!
Table of Contents
Contents are not accessible
Contents are not accessible
Contents are not accessible
Contents are not accessible
Contents are not accessible