Note
This view is available starting with V4.0.0.
Purpose
This view displays the status and recovery progress of the log streams in the current tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| LS_ID | bigint(20) | NO | The ID of the log stream. |
| STATUS | varchar(100) | NO | The status of the log stream. Valid values: CREATING: the log stream is being createdCREATED: the log stream is createdNORMAL: the log stream is availableDROPPING: the log stream is being dropped. All tablets on the log stream must be migratedTENANT DROPPING: the log stream is being dropped because the tenant to which it belongs is being droppedWAIT OFFLINE: the data of the log stream has been dropped and is waiting for garbage collectionCREATE ABORT: the log stream creation has failed or is not required. The log stream is being dropped. |
| CREATE_SCN | bigint(20) unsigned | NO | The starting point of the log stream. |
| DROP_SCN | bigint(20) unsigned | NO | The point at which the log stream is dropped. This is also the end point of all user data. |
| SYNC_SCN | bigint(20) unsigned | NO | The synchronization point of the log stream. |
| READABLE_SCN | bigint(20) unsigned | NO | The readable point of the log stream. |
| PRIMARY_ZONE | longtext | YES | The priority zone of the log stream. |
| UNIT_GROUP_ID | bigint(20) | NO | The ID of the unit group. |
| LS_GROUP_ID | bigint(20) | NO | The ID of the log stream group. |
Sample query
Query the status and recovery progress of the log streams in the sys tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_LS;
The query result is as follows:
+-------+--------+--------------+---------------+-------------+------------+----------+----------+--------------+------+
| LS_ID | STATUS | PRIMARY_ZONE | UNIT_GROUP_ID | LS_GROUP_ID | CREATE_SCN | DROP_SCN | SYNC_SCN | READABLE_SCN | FLAG |
+-------+--------+--------------+---------------+-------------+------------+----------+----------+--------------+------+
| 1 | NORMAL | zone1 | 0 | 0 | NULL | NULL | NULL | NULL | |
+-------+--------+--------------+---------------+-------------+------------+----------+----------+--------------+------+
1 row in set