When the election leader detects an exception on the local machine, it triggers an abnormal leader switch. The following scenarios are included:
CLOG_DISK_HANG: The clog disk hangs for more than 5s. 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. You can adjust the tolerance time by setting the cluster parameterdata_storage_warning_tolerance_time.SSTABLE_IO_HANG: The data disk hangs for more than 5s. You can adjust the tolerance time by setting the cluster parameterdata_storage_warning_tolerance_time.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 on the local machine, it lowers its election priority and selects a replica with a higher priority to trigger a re-election. You can query the DBA_OB_SERVER_EVENT_HISTORY view to check abnormal leader switch events and the corresponding causes.
obclient> select * from DBA_OB_SERVER_EVENT_HISTORY where module='FAILURE_DETECTOR' limit 10;
You can 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;