The switchover of the election leader is affected by the following exceptions:
CLOG_DISK_HANG: The clog disk hangs for more than 5s. To resolve the exception, you can adjust the tolerance time by setting the cluster parameterlog_storage_warning_tolerance_time.SLOG_WRITE_HANG: The slog-writing thread hangs for more than 5s. To resolve the exception, you can adjust the tolerance time by setting the cluster parameterdata_storage_warning_tolerance_time.SSTABLE_IO_HANG: The data disk hangs.CLOG_DISK_FULL: The clog disk is full.SCHEMA_NOT_REFRESHED: The schema is not refreshed.
When the election leader detects any of the preceding exceptions in the local server, it lowers its election priority and selects a replica with a higher priority to trigger a re-election. You can check the leader switchover exception events and the corresponding causes by querying the DBA_OB_SERVER_EVENT_HISTORY view.
obclient>
select * from DBA_OB_SERVER_EVENT_HISTORY where module='FAILURE_DETECTOR' limit 10;
You can execute the following statement to query the DBA_OB_SERVER_EVENT_HISTORY view to check the corresponding election events:
obclient>
select * from DBA_OB_SERVER_EVENT_HISTORY where module like '%ELECTION%' limit 10;