Note
For V4.4.2, this view is available starting with V4.4.2 BP2.
Overview
The V$OB_LS_LOG_REPLAY_STAT view displays the log replay progress for each log stream (LS) replica on the current node of a tenant. You must query this view on a standby database, or on a follower replica on the primary database.
Since logs are not replayed on the leader replica of the primary tenant (primary database), in query results, a row with ROLE = LEADER for the primary tenant is meaningless.
Columns
Column |
Type |
Nullable |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID |
| SVR_IP | varchar(46) | NO | Server IP address |
| SVR_PORT | bigint(20) | NO | Server port number |
| LS_ID | bigint(20) | NO | Log stream ID |
| ROLE | varchar(32) | NO | Log stream replica roles:
|
| ENABLED | tinyint(4) | NO | Whether the log replay service is enabled. |
| END_LSN | bigint(20) unsigned | NO | LSN written by Palf (right boundary for log replay) |
| UNSUBMITTED_LSN | bigint(20) unsigned | NO | The LSN of the next log to be committed to the replay queue |
| UNSUBMITTED_SCN | bigint(20) unsigned | NO | SCN of the next log to be submitted to the replay queue |
| MIN_UNREPLAYED_LSN | bigint(20) unsigned | NO | LSN of the earliest unreplayed log in the replay queue |
| MIN_UNREPLAYED_SCN | bigint(20) unsigned | NO | SCN of the earliest unreplayed log in the replay queue |
| PENDING_CNT | bigint(20) | NO | Number of tasks pending replay in memory |
Sample query
In a standby tenant, view the log replay progress of each log stream replica on the current node of the tenant.
obclient(root@standby_tenant)[oceanbase]> SELECT LS_ID, ROLE, ENABLED,
END_LSN, UNSUBMITTED_LSN, MIN_UNREPLAYED_LSN, PENDING_CNT
FROM oceanbase.V$OB_LS_LOG_REPLAY_STAT;
The query result is as follows:
+-------+----------+---------+-----------+-----------------+--------------------+-------------+
| LS_ID | ROLE | ENABLED | END_LSN | UNSUBMITTED_LSN | MIN_UNREPLAYED_LSN | PENDING_CNT |
+-------+----------+---------+-----------+-----------------+--------------------+-------------+
| 1 | FOLLOWER | 1 | 300636581 | 300299240 | 300299240 | 0 |
| 1001 | FOLLOWER | 1 | 197547054 | 197259486 | 197259486 | 0 |
+-------+----------+---------+-----------+-----------------+--------------------+-------------+
2 rows in set
