in Databases
273 views
0 votes
0 votes
Is the possibility of cascading rollbacks more in Wound and Wait or in Wait Die?
in Databases
by
273 views

1 Answer

2 votes
2 votes
Best answer
Wound-Wait protocol, a transaction may initiate a cascading rollback if it "wounds" (i.e., blocks) a transaction that is already holding a lock on a resource that the first transaction needs to access. If the blocked transaction subsequently releases the lock, the first transaction can acquire the lock and continue. If the blocked transaction does not release the lock, however, the first transaction may need to roll back and retry later. If this process continues for multiple transactions, it can lead to a cascading rollback.

In the Wait-Die protocol, a transaction may initiate a cascading rollback if it must "wait" (i.e., block) for a lock held by another transaction. If the other transaction releases the lock, the first transaction can acquire the lock and continue. If the other transaction does not release the lock, however, the first transaction may need to roll back and retry later. If this process continues for multiple transactions, it can lead to a cascading rollback.

It is worth noting that both the Wound-Wait and Wait-Die protocols are used to prevent deadlocks in database systems, and both can potentially result in cascading rollbacks in certain circumstances. The specific likelihood of cascading rollbacks will depend on the specific implementation and use of these protocols.
selected by

3 Comments

Many thanks!

Sorry, isn’t it clear that in which one it’s more?
0
0
It will completely depend on the system and database configuration.
1
1
Many thanks!

That question was asked in a book.
1
1