When the Election Leader detects an exception on the current server, it triggers a forced leader election. The following scenarios can trigger a forced leader election:
CLOG_DISK_HANG: The CLOG disk is hung for more than 5 seconds. You can adjust the cluster parameterlog_storage_warning_tolerance_timeto modify this threshold.SLOG_WRITE_HANG: The thread for writing to the SLOG is hung for more than 5 seconds. You can adjust the cluster parameterdata_storage_warning_tolerance_timeto modify this threshold.SSTABLE_IO_HANG: The data disk is hung for more than 5 seconds. You can adjust the cluster parameterdata_storage_warning_tolerance_timeto modify this threshold.CLOG_DISK_FULL: The CLOG disk is full.SCHEMA_NOT_REFRESHED: The schema is not refreshed.
After the Election Leader detects an exception on the current server, it lowers its own 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 view the forced leader election events and the corresponding exception reasons.
obclient(root@sys)[oceanbase]> select * from DBA_OB_SERVER_EVENT_HISTORY where module='FAILURE_DETECTOR' limit 10;
You can query the DBA_OB_SERVER_EVENT_HISTORY view to view the corresponding election events.
obclient(root@sys)[oceanbase]> select * from DBA_OB_SERVER_EVENT_HISTORY where module like '%ELECTION%' limit 10;
