The figure shows how an application that is using RR
isolation acquires locks. The following table shows what happens in the application
and in Db2®.
All locks are held until the application commits.
| Time | Event in application | Response in Db2 |
|---|---|---|
| 1 | Request row | Lock L |
| 2 | Lock L1 | |
| 3 | Lock L2 | |
| 4 | Request next row | Lock L3 |
| 5 | Lock L4 |