Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
etl::SystemState Struct Reference

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...

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.
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.

Detailed Description

Represents the state of the ETL subsystem.

Member Enumeration Documentation

◆ WriteCommand

enum class etl::SystemState::WriteCommand
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)

Member Data Documentation

◆ isAmendmentBlocked

util::prometheus::Bool etl::SystemState::isAmendmentBlocked
Initial value:
"etl_amendment_blocked",
"Whether clio detected an amendment block"
)
static util::prometheus::Bool boolMetric(std::string name, util::prometheus::Labels labels, std::optional< std::string > description=std::nullopt)
Get a bool based metric. It will be created if it doesn't exist.
Definition Prometheus.cpp:194
Class representing a collection of Prometheus labels.
Definition Label.hpp:59

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.

◆ isCorruptionDetected

util::prometheus::Bool etl::SystemState::isCorruptionDetected
Initial value:
"etl_corruption_detected",
"Whether clio detected a corruption that needs manual attention"
)

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.

◆ isStrictReadonly

util::prometheus::Bool etl::SystemState::isStrictReadonly
Initial value:
"read_only",
"Whether the process is in strict read-only mode"
)

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.

◆ isWriting

util::prometheus::Bool etl::SystemState::isWriting
Initial value:
"etl_writing",
"Whether the process is writing to the database"
)

Whether the process is writing to the database.

◆ writeCommandSignal

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.

  • Emitted with StartWriting when database stalls and node should attempt to become writer
  • Emitted with StopWriting when write conflicts are detected

The documentation for this struct was generated from the following file: