-
Notifications
You must be signed in to change notification settings - Fork 0
Protocol for Replication
There are two forms of synchronizations regarding start-commit-log and table, both maintained at the master site.
The simple one focuses on read/write behaviours on an instance of start-commit-log (or table), and the more complex one deals with the synchronization issues when a transaction is about to commit: atomically checking wcf (write-conflict-free) based on start-commit-log, generating commit-timestamp (if the transaction can be committed), and updating start-commit-log.
For the simple form of synchronization, we use ReentrantReadWriteLock to synchronize the read/write operations on an instance of start-commit-log (or table).
The atomicity requirement in committing a transaction is enforced by the write lock of the ReentrantReadWriteLock of start-commit-log.
using ReentrantReadWriteLock