Note
This view is available starting with V4.0.0.
Overview
Displays the status and recovery progress of the log streams for 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. For system log streams (log stream 1) and broadcast log streams, this field displays as 0, indicating that the log stream is not bound to any unit group.
NoteFor V4.2.5, starting from V4.2.5 BP5, the value of this field is always 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 log position at which 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 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:
|
BLOCK_TABLET_IN: The current broadcast log stream does not allow creating tablets.
NoteThis field is available starting with V4.2.0. |
| UNIT_LIST | varchar(1216) | NO | Unit list for user log stream distribution. System log streams and broadcast log streams are empty if no specific location is specified.
NoteFor version V4.2.5, this field is available starting from V4.2.5 BP5. |
Sample query
The system tenant queries the status and recovery progress of its own log streams.
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 | UNIT_LIST |
+-------+--------+--------------+---------------+-------------+------------+----------+----------+--------------+------+-----------+
| 1 | NORMAL | z1,z2,z3 | 0 | 0 | NULL | NULL | NULL | NULL | | |
+-------+--------+--------------+---------------+-------------+------------+----------+----------+--------------+------+-----------+
1 row in set
References
To view the log streams of all tenants, query CDB_OB_LS.
For more information about log streams, see Replica overview.
