#include <userver/storages/postgres/options.hpp>
PostgreSQL topology options.
Dynamic option POSTGRES_TOPOLOGY_SETTINGS
Definition at line 192 of file options.hpp.
Public Member Functions | |
| std::optional< std::chrono::milliseconds > | GetEffectiveRttThreshold () const noexcept |
| Returns the configured RTT threshold, or std::nullopt when RTT-based preference is disabled. | |
Public Attributes | |
| std::chrono::milliseconds | max_replication_lag {kDefaultMaxReplicationLag} |
| Maximum replication lag. Once the replica lag exceeds this value it will be automatically disabled. | |
| std::unordered_set< std::string, ::utils::StrIcaseHash, ::utils::StrIcaseEqual > | disabled_replicas {} |
| List of manually disabled replicas (FQDNs). | |
| std::chrono::milliseconds | rtt_threshold {kDefaultRttThreshold} |
| bool | rtt_threshold_enabled {true} |
| Controlled by POSTGRES_RTT_THRESHOLD_ENABLED; enabled by default. | |
|
inlinenoexcept |
Returns the configured RTT threshold, or std::nullopt when RTT-based preference is disabled.
Definition at line 209 of file options.hpp.
| std::unordered_set<std::string, ::utils::StrIcaseHash, ::utils::StrIcaseEqual> storages::postgres::TopologySettings::disabled_replicas {} |
List of manually disabled replicas (FQDNs).
Definition at line 198 of file options.hpp.
| std::chrono::milliseconds storages::postgres::TopologySettings::max_replication_lag {kDefaultMaxReplicationLag} |
Maximum replication lag. Once the replica lag exceeds this value it will be automatically disabled.
Definition at line 194 of file options.hpp.
| std::chrono::milliseconds storages::postgres::TopologySettings::rtt_threshold {kDefaultRttThreshold} |
Maximum EWMA RTT difference from the fastest host in the candidate set. Hosts outside this threshold are used only if no host has a known RTT. Zero is a valid threshold. Static and dynamic configuration values are limited to one minute.
Definition at line 203 of file options.hpp.
| bool storages::postgres::TopologySettings::rtt_threshold_enabled {true} |
Controlled by POSTGRES_RTT_THRESHOLD_ENABLED; enabled by default.
Definition at line 206 of file options.hpp.