Sessions Hang on row cache lock

时间:2021-12-23 18:53:31

Sessions Hang on "row cache lock" (dc_objects) While Creating & Dropping a Table Concurrently (文档 ID 2319957.1)

The cause is due to following bug which was closed as not a bug:

Bug 25641559- ROW CACHE LOCK WITHOUT HOLDER

"row cache lock" will happen if the application is constantly & concurrently executing CREATE/DROP DDL.

During the incident, lot of concurrent session attempt to execute drop a table that is already in recycle-bin with (most likely) original name.

The sessions do not hang forever, they move forward. Problem over here is - resource locked in S mode is not getting shared with concurrent S request .

This typically should not happen is happening because no session is able to LOAD the object during S request. This is indicated by the fact that object is

always seen to be marked with flag KQRFLOAD.

Table rename happens during Drop while moving it to recycle-bin. And during execution of rename, rnmobj() invokes kqrCreateNewVersion() that marks the

kqr object with flag KQRFOBSL (obsolete).

Combination of these 2 flags is leading to this problem apart from it being in recycle bin with original name.

To implement the solution, please execute the following steps:

1. Disable recyclebin

alter system set recyclebin='off' scope=spfile sid='*';

OR

2. Disable system triggers

alter system set "_system_trig_enabled"=false;