Note
For V4.4.2, this view is available starting from V4.4.2 BP2.
Overview
The GV$OB_LS_LOG_TRANSPORT_STAT view displays the transmission status of logs pushed from each log stream (LS) on all nodes of a tenant to a standby tenant (standby database) in strong sync mode (SYNC_MODE is SYNC). To query this view, you must log in as the primary tenant (primary database) or the sys tenant of the cluster where the primary tenant (primary database) resides.
The log transfer service operates only in strong sync mode. In async mode, the standby database actively pulls logs, so this record is meaningless.
Columns
Column |
Type |
Nullable |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID |
| LS_ID | bigint(20) | NO | Log Stream ID |
| SVR_IP | varchar(46) | NO | Server IP Address |
| SVR_PORT | bigint(20) | NO | Server Port Number |
| ROLE | varchar(32) | NO | Log stream replica roles:
|
| ENABLED | tinyint(4) | NO | Whether the log transport service is enabled. |
| END_LSN | bigint(20) unsigned | NO | LSN committed by the primary tenant (primary database) Palf |
| END_SCN | bigint(20) unsigned | NO | SCN committed by the primary tenant (primary database) Palf |
| LAST_SENT_LSN | bigint(20) unsigned | NO | Last LSN sent to the standby tenant (standby database) |
| LAST_SENT_SCN | bigint(20) unsigned | NO | Last SCN sent to the standby tenant (standby database) |
| STANDBY_END_LSN | bigint(20) unsigned | NO | Confirmed LSN written on the standby tenant (standby database) |
| STANDBY_END_SCN | bigint(20) unsigned | NO | Confirmed SCN written on the standby tenant (standby database) |
| STANDBY_ADDR | varchar(52) | NO | Address of the log stream leader on the standby tenant (standby database). If the value is 0.0.0.0:0, the address is invalid. |
Sample query
In the sys tenant of the cluster where the primary tenant resides, query the transmission status of logs pushed from each LS on all nodes of the primary tenant with ID 1002 to the standby tenants.
Confirm the synchronization mode of the primary tenant LS.
obclient(root@sys)[oceanbase]> SELECT TENANT_ID, SVR_IP, SVR_PORT, LS_ID, ROLE, SYNC_MODE FROM oceanbase.GV$OB_LOG_STAT WHERE TENANT_ID = 1002 AND ROLE = 'LEADER';The query result is as follows:
+-----------+-------------+----------+-------+--------+-----------+ | TENANT_ID | SVR_IP | SVR_PORT | LS_ID | ROLE | SYNC_MODE | +-----------+-------------+----------+-------+--------+-----------+ | 1002 | 6.xx.xxx.91 | 2882 | 1 | LEADER | SYNC | | 1002 | 6.xx.xxx.91 | 2882 | 1001 | LEADER | SYNC | +-----------+-------------+----------+-------+--------+-----------+ 2 rows in setThe result
SYNCindicates that the current tenant's log stream synchronization mode is strong sync.Query the transmission status of log streaming from each log source on all nodes of the primary tenant to the standby tenant.
obclient(root@sys)[oceanbase]> SELECT TENANT_ID, SVR_IP, SVR_PORT, LS_ID, ROLE, ENABLED, END_LSN, LAST_SENT_LSN, STANDBY_END_LSN, STANDBY_ADDR FROM oceanbase.GV$OB_LS_LOG_TRANSPORT_STAT WHERE TENANT_ID = 1002 AND ROLE = 'LEADER';The query result is as follows:
+-----------+-------------+----------+-------+--------+---------+-----------+---------------+-----------------+-------------------+ | TENANT_ID | SVR_IP | SVR_PORT | LS_ID | ROLE | ENABLED | END_LSN | LAST_SENT_LSN | STANDBY_END_LSN | STANDBY_ADDR | +-----------+-------------+----------+-------+--------+---------+-----------+---------------+-----------------+-------------------+ | 1002 | 6.xx.xxx.91 | 2882 | 1 | LEADER | 1 | 304766784 | 304766784 | 304766784 | 6.xx.xxx.160:2882 | | 1002 | 6.xx.xxx.91 | 2882 | 1001 | LEADER | 1 | 200961942 | 200961942 | 200961942 | 6.xx.xxx.160:2882 | +-----------+-------------+----------+-------+--------+---------+-----------+---------------+-----------------+-------------------+ 2 rows in set
