|
Clio
develop
The XRP Ledger API server.
|
Represents the state of the ETL subsystem. More...
#include <SystemState.hpp>
Public Types | |
| enum class | WriteCommand { StartWriting , StopWriting } |
| Commands for controlling the ETL writer state. More... | |
Static Public Member Functions | |
| static std::shared_ptr< SystemState > | makeSystemState (util::config::ClioConfigDefinition const &config) |
| Factory method to create a SystemState instance. | |
Public Attributes | |
| util::prometheus::Bool | isStrictReadonly |
| Whether the process is in strict read-only mode. | |
| util::prometheus::Bool | isWriting |
| Whether the process is writing to the database. | |
| util::prometheus::Bool | isLoadingCache |
| Whether the process is still loading cache after startup. | |
| boost::signals2::signal< void(WriteCommand)> | writeCommandSignal |
| Signal for coordinating ETL writer state transitions. | |
| util::prometheus::Bool | isAmendmentBlocked |
| Whether clio detected an amendment block. | |
| util::prometheus::Bool | isCorruptionDetected |
| Whether clio detected a corruption that needs manual attention. | |
| util::prometheus::Bool | isWriterDecidingFallback |
| Whether the cluster is using the fallback writer decision mechanism. | |
Represents the state of the ETL subsystem.
|
strong |
Commands for controlling the ETL writer state.
These commands are emitted via writeCommandSignal to coordinate writer state transitions across components.
| Enumerator | |
|---|---|
| StartWriting | Request to attempt taking over as the ETL writer |
| StopWriting | Request to give up the ETL writer role (e.g., due to write conflict) |
|
inlinestatic |
Factory method to create a SystemState instance.
| config | The configuration to use for initializing the system state |
| util::prometheus::Bool etl::SystemState::isAmendmentBlocked |
Whether clio detected an amendment block.
Being amendment blocked means that Clio was compiled with libxrpl that does not yet support some field that arrived from rippled and therefore can't extract the ledger diff. When this happens, Clio can't proceed with ETL and should log this error and only handle RPC requests.
| util::prometheus::Bool etl::SystemState::isCorruptionDetected |
Whether clio detected a corruption that needs manual attention.
When corruption is detected, Clio should disable cache and stop the cache loading process in order to prevent further corruption.
| util::prometheus::Bool etl::SystemState::isLoadingCache |
Whether the process is still loading cache after startup.
| util::prometheus::Bool etl::SystemState::isStrictReadonly |
Whether the process is in strict read-only mode.
In strict read-only mode, the process will never attempt to become the ETL writer, and will only publish ledgers as they are written to the database.
| util::prometheus::Bool etl::SystemState::isWriterDecidingFallback |
Whether the cluster is using the fallback writer decision mechanism.
The fallback mechanism is triggered when:
When fallback mode is active, the cluster stops using the cluster communication mechanism (TTL-based role announcements) and relies on the slower but more reliable database-based conflict detection. This flag propagates across the cluster - if any node enters fallback mode, all nodes in the cluster will switch to fallback mode.
| util::prometheus::Bool etl::SystemState::isWriting |
Whether the process is writing to the database.
| boost::signals2::signal<void(WriteCommand)> etl::SystemState::writeCommandSignal |
Signal for coordinating ETL writer state transitions.
This signal allows components to request changes to the writer state without direct coupling.