Kalan
Member
Two different procedures are deadlocking each other by accessing the same record from two different sessions. Not sure if any other workaround to deal this type of scenario.
Could someone pls suggest on this? - Thanks.
For example,
Proc-1.p
Do Transaction:
Access the record with exclusive-lock no-wait.
If locked then
Repeat while locked <rec>:
Access the record with exclusive-lock no-wait.
End.
if avail <rec> then
update <rec>.
End transaction.
Proc-2.p
Do Transaction:
Access the record with exclusive-lock no-wait.
If locked then
Repeat while locked <rec>:
Access the record with exclusive-lock no-wait.
End.
if avail <rec> then
update <rec>.
End transaction.
Could someone pls suggest on this? - Thanks.
For example,
Proc-1.p
Do Transaction:
Access the record with exclusive-lock no-wait.
If locked then
Repeat while locked <rec>:
Access the record with exclusive-lock no-wait.
End.
if avail <rec> then
update <rec>.
End transaction.
Proc-2.p
Do Transaction:
Access the record with exclusive-lock no-wait.
If locked then
Repeat while locked <rec>:
Access the record with exclusive-lock no-wait.
End.
if avail <rec> then
update <rec>.
End transaction.