Note
This view is available starting with V4.0.0.
Purpose
The DBA_OB_DEADLOCK_EVENT_HISTORY view displays the historical records of deadlock events in the current tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| EVENT_ID | bigint(20) unsigned | NO | The ID of the deadlock event. |
| SVR_IP | varchar(46) | NO | The IP address of the node involved in the deadlock event. |
| SVR_PORT | bigint(20) unsigned | NO | The port number of the node involved in the deadlock event. |
| DETECTOR_ID | bigint(20) unsigned | NO | The ID of the node involved in the deadlock event (unique within a process). |
| REPORT_TIME | timestamp(6) | NO | The time when the deadlock event was reported (based on the timestamp of the reporting server). |
| CYCLE_IDX | bigint(20) | NO | The index of the node in the cycle. |
| CYCLE_SIZE | bigint(20) | NO | The number of nodes involved in the deadlock event. |
| ROLE | longtext | NO | The role of the node in the deadlock event: |
| PRIORITY_LEVEL | longtext | NO | The priority level of the node: |
| PRIORITY | bigint(20) unsigned | NO | The priority value of the node. When priorities are the same, the priority value is comparable, and the node with the lowest priority value in the cycle is eliminated. |
| CREATE_TIME | timestamp(6) | NO | The time when the node was created. |
| START_DELAY_US | bigint(20) unsigned | NO | The interval between the creation of the node and the time when it is allowed to start detecting deadlocks, in microseconds. |
| MODULE | longtext | NO | The module to which the node belongs. The value is fixed as transaction. |
| VISITOR | longtext | NO | The resource visitor represented by the node, in the format {session_id:$1}:{txid:$2}. $1 and $2 are numbers. |
| OBJECT | longtext | NO | The resource that the node wants to acquire. The content of the primary key of the row, in the format {addr:"$1:$2"}:{ls:$3}:{tablet:$4}:{row_key:{$5}}. Here
|
| EXTRA_NAME1 | longtext | YES | The name of the additional information 1 to be added to the deadlock reporting event, in the format wait_sql. |
| EXTRA_VALUE1 | longtext | YES | The SQL statement currently being executed when the transaction deadlocked. |
| EXTRA_NAME2 | longtext | YES | The name of the additional information 2 to be added to the deadlock reporting event, in the format hold_sql_request_time. |
| EXTRA_VALUE2 | longtext | YES | The request time of the statement that holds the lock. |
| EXTRA_NAME3 | longtext | YES | The name of the additional information 3 to be added to the deadlock reporting event, in the format hold_sql. |
| EXTRA_VALUE3 | longtext | YES | The SQL statement corresponding to the cycle_idx - 1 row record of the object. |
Sample query
Query the historical records of deadlock events for all tenants.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_DEADLOCK_EVENT_HISTORY LIMIT 10;
