After you enable the arbitration service for a tenant, you can query views for information about the upgrade or downgrade of log streams in the tenant.
Query log stream upgrade/downgrade events
You can query the DBA_OB_SERVER_EVENT_HISTORY view in the sys tenant for the upgrade and downgrade events of all log streams.
Log on to the
systenant of the cluster as therootuser.Execute the following statements to query whether log stream upgrade or downgrade events have occurred.
Query log stream downgrade events
SELECT * FROM oceanbase.DBA_OB_SERVER_EVENT_HISTORY WHERE event LIKE "%DEGRADE%";If the query result is empty, no log stream is downgraded. Otherwise, the query result shows the information about log stream replicas that have downgraded.
Query log stream upgrade events
SELECT * FROM oceanbase.DBA_OB_SERVER_EVENT_HISTORY WHERE event LIKE "%UPGRADE%";If the query result is empty, no log stream is upgraded. Otherwise, the query result shows the information about log stream replicas that have upgraded.
Query the log stream upgrade/downgrade result
After a log stream upgrade or downgrade event occurs, you can query the GV$OB_LOG_STAT view in the sys tenant or the V$OB_LOG_STAT view in a user tenant for the upgrade or downgrade result of the log stream.
Log on to the sys tenant or a user tenant as the administrator.
Execute the following statement to query the log stream upgrade or downgrade result.
sys tenant
SELECT * FROM oceanbase.GV$OB_LOG_STAT WHERE tenant_id= xxxx;User tenant
MySQL modeOracle modeThe syntax is as follows:
SELECT * FROM oceanbase.GV$OB_LOG_STAT WHERE tenant_id= xxxx;The syntax is as follows:
SELECT * FROM SYS.GV$OB_LOG_STAT WHERE tenant_id= xxxx;
In the query result, view the
DEGRADED_LISTcolumn corresponding to the log stream replica whose role isLEADER. If a log stream downgrade event occurs, the log stream replica downgraded due to an exception is displayed in this column. If a log stream upgrade event occurs, the upgraded replica is removed from this column.
References
For more information about log stream upgrade and downgrade, see the following topics: