0

I am reading chapter 6 of your book, Principles of Transaction Processing and the concept of update lock explained in there is not very clear to me. Basically, what I am not clear about is that won't locking conversion deadlock occur when you try to upgrade a update lock to the write lock. Say we say the deadlock does not occur during conversion of update lock to write lock. Can you then not have the following scenario

u1[x]r2[x]w1[x]w1[z]w2[z].

u1[x] means transaction 1 has a update lock on x.

So in the above history transaction 2 is before 1 on x but after 1 on z. Doesnt that violate serializability?

I would really appreciate if you can clear this for me.

4

1 回答 1

0

哦,nvm,我刚读到书上说,如果您有并发读取操作,则不能从更新锁升级到写锁。所以是的,它不会以这种方式违反可序列化性:)。此外,如果有人碰巧遇到这种情况,您不能将读锁升级为更新锁,因为这也会因锁转换而导致死锁。

于 2013-03-02T21:01:20.723 回答