Note
This view is available starting with V4.0.0.
Purpose
This view displays the distribution of log streams (LS) replicas in the current tenant.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| CREATE_TIME | datetime(6) | NO | The creation time. |
| MODIFY_TIME | datetime(6) | NO | The modification time. |
| LS_ID | bigint(20) | NO | The log stream ID. |
| SVR_IP | varchar(46) | NO | The IP address of the server. |
| SVR_PORT | bigint(20) | NO | The port number of the server. |
| SQL_PORT | bigint(20) | NO | The SQL port number. |
| ZONE | varchar(128) | NO | The name of the zone. |
| ROLE | varchar(8) | NO | The role of the replica. LEADERFOLLOWER |
| MEMBER_LIST | varchar(4480) | NO | The list of replicas, separated by commas. The format of a single replica is svr_ip:svr_port:timestamp. The following table describes the parameters in the format.
|
| PAXOS_REPLICA_NUMBER | bigint(20) | NO | The number of Paxos replicas. When the role is LEADER, this field is valid. Otherwise, it is NULL. |
| REPLICA_TYPE | varchar(18) | NO | The type of the replica.
|
| LEARNER_LIST | longtext | YES | The list of read-only replicas of the current log stream, separated by commas. The format of a single replica is svr_ip:svr_port:timestamp:flag. The following table describes the parameters in the format.
Example: 172.xx.xxx.xxx:2882:1:0 NoteThis field is available starting with V4.2.0. |
| REBUILD | varchar(5) | NO | Indicates whether the replica is being rebuilt.
NoteThis field is available starting with V4.2.1. |
Sample query
Query the distribution of log stream replicas in the current tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_LS_LOCATIONS;
The query result is as follows:
+----------------------------+----------------------------+-------+----------------+----------+----------+-------+--------+-----------------------+----------------------+--------------+--------------+---------+
| CREATE_TIME | MODIFY_TIME | LS_ID | SVR_IP | SVR_PORT | SQL_PORT | ZONE | ROLE | MEMBER_LIST | PAXOS_REPLICA_NUMBER | REPLICA_TYPE | LEARNER_LIST | REBUILD |
+----------------------------+----------------------------+-------+----------------+----------+----------+-------+--------+-----------------------+----------------------+--------------+--------------+---------+
| 2024-09-03 11:24:50.890232 | 2024-09-03 11:24:53.272771 | 1 | 172.xx.xxx.xxx | 2882 | 2881 | zone1 | LEADER | 172.xx.xxx.xxx:2882:1 | 1 | FULL | | FALSE |
| 2024-09-03 11:25:04.074197 | 2024-09-03 11:25:06.474247 | 1001 | 172.xx.xxx.xxx | 2882 | 2881 | zone1 | LEADER | 172.xx.xxx.xxx:2882:1 | 1 | FULL | | FALSE |
+----------------------------+----------------------------+-------+----------------+----------+----------+-------+--------+-----------------------+----------------------+--------------+--------------+---------+
2 rows in set