60 views
Can $conservative$ $2PL$ be $NON-RECOVERABLE?$
according to me they can be, but in some places i find them to be mentioned as recoverable..

which is true?
| 60 views
0
+4

I think conservative 2PL can definitely produce non-recoverable (cascading) schedules.

For the simple reason that there is no restriction on when the locks are released. It only dictates that all necessary locks are obtained before start of transaction, but places no restriction on when they are released.

If a transaction releases a X-Lock immediately after writing (but before committing), another transaction can surely acquire an S-Lock and perform a dirty read. Then proceed to commit before the first transaction, ending up with a non-recoverable schedule.

Here's an example:

$T_1$ $T_2$
Lock-X(A)
(all necessary locks acquired before start)

Write(A)
Unlock-X(A)
Lock-S(A)
...
Unlock-S(A)
Commit
....
Commit
0
Ya..that is the reason I also though the same, thanks for confirming
0

@shashin

All the best.. :)

+1

@Debapaul All the best... :)

+1
All the very best people - stay in control of your nerves and give it your best !