Module recovery

Source

Structsยง

DatabaseRecoveringState ๐Ÿ”’
DatabaseRecoveryMetrics ๐Ÿ”’
DatabaseStatusAction ๐Ÿ”’
EnterInitializing ๐Ÿ”’
EnterReset ๐Ÿ”’
EnterRunning ๐Ÿ”’

Enumsยง

DatabaseRecoveringStage ๐Ÿ”’
We can treat each database as a state machine of 3 states: Running, Resetting and Initializing. The state transition can be triggered when receiving 3 variants of response: ReportDatabaseFailure, BarrierComplete, DatabaseReset. The logic of state transition can be summarized as followed:
RecoveringStateAction ๐Ÿ”’

Constantsยง

INITIAL_RESET_REQUEST_ID ๐Ÿ”’