Note
This view is available starting with V4.0.0.
Purpose
This view displays the status of the Palf log stream. Common usage scenarios include:
- Checking if a log stream has a leader (the replica where the leader resides).
- Checking the list of members in the log stream (number of Paxos replicas).
- Checking the synchronization status of replicas.
- Checking the recyclable point of the log stream.
- Checking the range of log consumption services allowed for the log stream (including LSN/SCN).
- Checking the access mode of the Palf.
The results vary depending on the tenant querying this view:
- When querying this view from the sys tenant, it displays the status of all tenants' log stream Palfs.
- When querying this view from a normal tenant, it displays only the status of the log stream Palfs for that tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The tenant ID. |
| LS_ID | bigint(20) | NO | The log stream ID. |
| SVR_IP | varchar(46) | NO | The IP address of the OBServer. |
| SVR_PORT | bigint(20) | NO | The port number of the OBServer. |
| ROLE | varchar(32) | NO | The role of the replica:
|
| PROPOSAL_ID | bigint(20) | NO | The Paxos proposal ID. |
| CONFIG_VERSION | varchar(128) | NO | The version number corresponding to the configuration change. |
| ACCESS_MODE | varchar(32) | NO | The access mode:
|
| PAXOS_MEMBER_LIST | varchar(1024) | NO | The list of Paxos members. |
| PAXOS_REPLICA_NUM | bigint(20) | NO | The number of Paxos replicas. |
| IN_SYNC | varchar(3) | NO | Indicates whether the replica is completely synchronized with the leader. |
| BASE_LSN | bigint(20) | NO | The maximum recyclable point. |
| BEGIN_LSN | bigint(20) | NO | The minimum consumable point (LSN). |
| BEGIN_SCN | bigint(20) | NO | The minimum consumable point (SCN). |
| END_LSN | bigint(20) | NO | The maximum continuous majority point or the maximum consumable point (LSN). |
| END_SCN | bigint(20) | NO | The maximum continuous majority point or the maximum consumable point (SCN). |
| MAX_LSN | bigint(20) | NO | The maximum write point (LSN). |
| MAX_SCN | bigint(20) | NO | The maximum write point (SCN). |
| ARBITRATION_MEMBER | varchar(128) | NO | The server address of the arbitration member
NoteThis column is available starting with V4.1.0. |
| DEGRADED_LIST | varchar(1024) | NO | The list of full-featured replicas that are downgraded in the arbitration scenario
NoteThis column is available starting with V4.1.0. |
| LEARNER_LIST | longtext | NO | The list of read-only replicas for the current log stream
NoteThis column is available starting with V4.2.0. |
Sample query
Query the status of the log stream replicas for the user tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_LOG_STAT\G
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1002
LS_ID: 1
SVR_IP: 172.xx.xx.xx
SVR_PORT: 2882
ROLE: LEADER
PROPOSAL_ID: 1
CONFIG_VERSION: {proposal_id:1, config_seq:2}
ACCESS_MODE: APPEND
PAXOS_MEMBER_LIST: 172.xx.xx.xx:2882:1
PAXOS_REPLICA_NUM: 1
IN_SYNC: YES
BASE_LSN: 67104768
BEGIN_LSN: 0
BEGIN_SCN: 2
END_LSN: 113789460
END_SCN: 1722479078519570424
MAX_LSN: 113789460
MAX_SCN: 1722479078519570424
ARBITRATION_MEMBER:
DEGRADED_LIST:
LEARNER_LIST:
*************************** 2. row ***************************
TENANT_ID: 1002
LS_ID: 1001
SVR_IP: 172.xx.xx.xx
SVR_PORT: 2882
ROLE: LEADER
PROPOSAL_ID: 1
CONFIG_VERSION: {proposal_id:1, config_seq:2}
ACCESS_MODE: APPEND
PAXOS_MEMBER_LIST: 172.xx.xx.xx:2882:1
PAXOS_REPLICA_NUM: 1
IN_SYNC: YES
BASE_LSN: 0
BEGIN_LSN: 0
BEGIN_SCN: 1722408567239862706
END_LSN: 86105215
END_SCN: 1722479078519570424
MAX_LSN: 86105215
MAX_SCN: 1722479078519570424
ARBITRATION_MEMBER:
DEGRADED_LIST:
LEARNER_LIST:
2 rows in set