Overview
Displays the status and recovery progress of log streams under the current tenant.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| LS_ID | bigint(20) | NO | Log Stream ID |
| STATUS | varchar(100) | NO | The status of the log stream, including:
|
| PRIMARY_ZONE | longtext | YES | Election Priority of Log Streams |
| UNIT_GROUP_ID | bigint(20) | NO | Unit group ID. This field always has a value of 0. |
| LS_GROUP_ID | bigint(20) | NO | Log stream group ID. For system log streams (log stream 1) and broadcast log streams, this field displays as 0, indicating that the log stream does not belong to any log stream group. |
| CREATE_SCN | bigint(20) unsigned | NO | The timestamp when the log stream starts writing logs. |
| DROP_SCN | bigint(20) unsigned | NO | The log stream deletion timestamp, which is also the end timestamp of all user data. If the log stream is deleted, this field records the SCN at the time of deletion; if it is not deleted, this field is empty. |
| SYNC_SCN | bigint(20) unsigned | NO | The synchronization timestamp of the log stream, indicating the SCN of the last successfully synchronized transaction. |
| READABLE_SCN | bigint(20) unsigned | NO | The readable point of a log stream, indicating the minimum SCN at which the log stream can be read. |
| FLAG | varchar(2048) | NO | Log stream tag:
|
| UNIT_LIST | varchar(1216) | NO | The list of units for distributing user log streams. This parameter is empty for system and broadcast log streams if no specific location is specified. |
Sample query
The system tenant can view the log stream status and recovery progress of the current tenant.
obclient(root@sys)[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 | UNIT_LIST |
+-------+--------+--------------+---------------+-------------+------------+----------+----------+--------------+------+-----------+
| 1 | NORMAL | zone1 | 0 | 0 | NULL | NULL | NULL | NULL | | |
+-------+--------+--------------+---------------+-------------+------------+----------+----------+--------------+------+-----------+
1 row in set
References
View the status and recovery progress of log streams for all tenants: CDB_OB_LS
For more information about log stream replicas, see Replica overview.