Wednesday, February 5, 2020

Concurrency Control

Paraphrasing https://vladmihalcea.com/how-does-mvcc-multi-version-concurrency-control-work/

In Concurrency Control theory, there are two ways you can deal with conflicts:
  • You can avoid them, by employing a pessimistic locking mechanism (e.g. Read/Write locks, Two-Phase Locking)
  • You can allow conflicts to occur, but you need to detect them using an optimistic locking mechanism (e.g. logical clock, MVCC) - this is essentially that same concept of "tokens" I was previously exposed to in the context of distributed locks. 

No comments:

Post a Comment