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 log stream ID. |
| STATUS | varchar(100) | NO | The status of the log stream. Valid values: CREATING: The log stream is being created.CREATED: The log stream is created.NORMAL: The log stream is available for service.DROPPING: The log stream is being dropped. All tablets on the log stream must be migrated before the log stream is dropped.TENANT DROPPING: The log stream is being dropped because its tenant is being dropped.WAIT OFFLINE: The data on the log stream has been dropped. The log stream is waiting for garbage collection.CREATE ABORT: The log stream is being dropped because the log stream creation failed or is not required. |
| 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 point at which all user data ends. |
| 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 election priority of the log stream. |
| UNIT_GROUP_ID | bigint(20) | NO | The unit group ID. |
| LS_GROUP_ID | bigint(20) | NO | The log stream group ID. |
Sample query
Query the status and recovery progress of the log streams in the current 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 | zone1 | 0 | 0 | NULL | NULL | 1736391769327655000 | 1736391769227545000 | |
| 1001 | NORMAL | zone1 | 1001 | 1001 | 1736152420990131001 | NULL | 1736391769327655000 | 1736391769227545000 | |
+-------+--------+--------------+---------------+-------------+---------------------+----------+---------------------+---------------------+------+
2 rows in set