Note
This view was introduced in OceanBase Database V4.0.0.
Description
This view displays the status and restore progress of log streams in the current tenant.
Fields
| Field name | Type | Not null | Description |
|---|---|---|---|
| LS_ID | bigint(20) | NO | Log stream ID |
| STATUS | varchar(100) | NO | The status of the log stream. It can be one of the following: CREATING: The log stream is being created.CREATED: The log stream has been created.NORMAL: The log stream is available for service.DROPPING: The log stream is to be deleted. The tablets on the log stream need to be migrated.TENANT DROPPING: The log stream is located in a tenant to be deleted. The log stream needs to be deleted.WAIT OFFLINE: The data of the log stream has been deleted. It is waiting for garbage collection.CREATE ABORT: The creation of the log stream has failed or is no longer needed. The log stream is to be deleted. |
| PRIMARY_ZONE | longtext | YES | The election priority of the log stream. |
| UNIT_GROUP_ID | bigint(20) | NO | Unit group ID |
| LS_GROUP_ID | bigint(20) | NO | Log stream group ID |
| CREATE_SCN | bigint(20) unsigned | NO | The SCN where the log stream starts writing logs. |
| DROP_SCN | bigint(20) unsigned | NO | The SCN where the log stream is to be deleted. It is also the ending SCN of all user data. |
| SYNC_SCN | bigint(20) unsigned | NO | The synchronization SCN of the log stream. |
| READABLE_SCN | bigint(20) unsigned | NO | The readable SCN of the log stream. |
| FLAG | varchar(2048) | NO | The flags of the log stream. It can be one of the following:
NoteThis field was introduced in V4.2.0. |
Examples
Query the status and restore progress of log streams in the current tenant from 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