Reputation: 23
The image below shows an example of an S2PL transaction, can anyone convert this example to R2PL?
Upvotes: 0
Views: 168
Reputation: 117
The differences between S2PL and R2PL is really only during the second phase, i.e. when they release read locks.
For S2PL, a transaction must hold all its write locks till it commits or aborts, while R2PL releases all locks only after commit or abort.
So, to convert it to R2PL, you just have to move the unlock(A)
to after the commit
point, and before unlock(B)
.
Upvotes: 0