Note
This view is available starting with V4.0.0.
Purpose
This view displays the status and recovery progress of 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 to be dropped, and the tablets on the log stream must be migratedTENANT DROPPING: the log stream is to be dropped because the tenant to which it belongs is being droppedWAIT OFFLINE: the data of the log stream has been dropped, and the log stream is waiting for garbage collectionCREATE ABORT: the log stream is to be dropped because the log stream creation failed or is not required. |
| PRIMARY_ZONE | longtext | YES | The priority of the log stream for election. |
| 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. |
| 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 point is also the end 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. |
| FLAG | varchar(2048) | NO | The flag of the log stream. Valid values:
NoteThis column is available starting with V4.2.0. |
Sample query
Query the status and recovery progress of log streams in the user 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 | z1 | 0 | 0 | NULL | | 1741745935006514499 | 1741745934905802306 | |
| 1001 | NORMAL | z1 | 1001 | 1001 | 1731298030274009621 | | 1741745935006514499 | 1741745934905802306 | |
+-------+--------+--------------+---------------+-------------+---------------------+----------+---------------------+---------------------+------+
2 rows in set