Note
This view is introduced in V4.0.0.
Purpose
This view displays the status and restore 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 created.CREATED: the log stream is created.NORMAL: the log stream is available.DROPPING: the log stream is to be deleted. The tablets on the log stream need to be migrated.TENANT DROPPING: the tenant that contains the log stream is to be deleted. The log stream needs to be deleted.WAIT OFFLINE: the data of the log stream has been deleted. The log stream is waiting for garbage collection.CREATE ABORT: the log stream creation failed or is not needed. The log stream is to be deleted. |
| PRIMARY_ZONE | longtext | YES | The primary 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. |
| CREATE_SCN | bigint(20) unsigned | NO | The SCN at which the log stream starts writing logs. |
| DROP_SCN | bigint(20) unsigned | NO | The SCN at which the log stream is deleted. It is also the end 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 flag of the log stream. Valid values:
NoteThis field is introduced in V4.2.0. |
Sample query
A user tenant queries the status and restore progress of log streams in the tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_LS;
The following table describes the result.
+-------+--------+--------------+---------------+-------------+---------------------+----------+---------------------+---------------------+------+
| 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