Note
This view is available starting with V4.0.0.
Purpose
This view displays the status of a log stream Palf. Common use cases include:
- Checking whether a log stream has a leader (the leader's replica).
- Checking the list of members (number of Paxos replicas) of a log stream.
- Checking the synchronization status of replicas.
- Checking the recyclable point of a log stream.
- Checking the range of a log stream that allows log consumption services (including LSN/SCN).
- Checking the access mode of a Palf.
The results vary depending on the tenant querying this view:
- When querying this view as the sys tenant, the status of all tenants' log stream Palfs is displayed.
- When querying this view as a normal tenant, only the status of the current tenant's log stream Palfs is displayed.
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. Valid values:
|
| 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. Valid values:
|
| 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 fully 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 arbitration mode.
NoteThis column is available starting with V4.1.0. |
| LEARNER_LIST | longtext | NO | The list of read-only replicas of the current log stream.
NoteThis column is available starting with V4.2.0. |
Sample query
Query the status of the log stream replicas of the current 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
