mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-03 18:15:51 +00:00
fix comments
This commit is contained in:
@@ -91,9 +91,9 @@ This document provides a list of all available Clio configuration properties in
|
||||
|
||||
- **Required**: True
|
||||
- **Type**: string
|
||||
- **Default value**: `scylladb`
|
||||
- **Constraints**: The value must be one of the following: `scylladb`, `aws_keyspace`.
|
||||
- **Description**: The specific database backend provider we are using. Currently we only support scylladb, or aws_keyspace.
|
||||
- **Default value**: `cassandra`
|
||||
- **Constraints**: The value must be one of the following: `cassandra`, `aws_keyspace`.
|
||||
- **Description**: The specific database backend provider we are using. Currently we only support cassandra, or aws_keyspace.
|
||||
|
||||
### database.cassandra.core_connections_per_host
|
||||
|
||||
|
||||
@@ -61,8 +61,10 @@ Cluster::Cluster(Settings const& settings) : ManagedObject{cass_cluster_new(), k
|
||||
cass_cluster_set_request_timeout(*this, settings.requestTimeout.count());
|
||||
|
||||
// TODO: AWS keyspace reads should be local_one to save cost
|
||||
if (auto const rc = cass_cluster_set_consistency(*this, CASS_CONSISTENCY_LOCAL_QUORUM); rc != CASS_OK) {
|
||||
throw std::runtime_error(fmt::format("Error setting cassandra consistency: {}", cass_error_desc(rc)));
|
||||
if (settings.provider == "aws_keyspace") {
|
||||
if (auto const rc = cass_cluster_set_consistency(*this, CASS_CONSISTENCY_LOCAL_QUORUM); rc != CASS_OK) {
|
||||
throw std::runtime_error(fmt::format("Error setting cassandra consistency: {}", cass_error_desc(rc)));
|
||||
}
|
||||
}
|
||||
|
||||
if (auto const rc = cass_cluster_set_core_connections_per_host(*this, settings.coreConnectionsPerHost);
|
||||
|
||||
@@ -87,7 +87,7 @@ static constexpr std::array<char const*, 2> kPROCESSING_POLICY = {"parallel", "s
|
||||
/**
|
||||
* @brief specific values that are accepted for database provider in config.
|
||||
*/
|
||||
static constexpr std::array<char const*, 2> kPROVIDER = {"scylladb", "aws_keyspace"};
|
||||
static constexpr std::array<char const*, 2> kPROVIDER = {"cassandra", "aws_keyspace"};
|
||||
|
||||
/**
|
||||
* @brief An interface to enforce constraints on certain values within ClioConfigDefinition.
|
||||
|
||||
@@ -280,7 +280,7 @@ getClioConfig()
|
||||
{"database.cassandra.password", ConfigValue{ConfigType::String}.optional()},
|
||||
{"database.cassandra.certfile", ConfigValue{ConfigType::String}.optional()},
|
||||
{"database.cassandra.provider",
|
||||
ConfigValue{ConfigType::String}.defaultValue("scylladb").withConstraint(gValidateProvider)},
|
||||
ConfigValue{ConfigType::String}.defaultValue("cassandra").withConstraint(gValidateProvider)},
|
||||
|
||||
{"allow_no_etl", ConfigValue{ConfigType::Boolean}.defaultValue(false)},
|
||||
{"__ng_etl", ConfigValue{ConfigType::Boolean}.defaultValue(false)},
|
||||
|
||||
@@ -167,7 +167,7 @@ private:
|
||||
KV{.key = "database.cassandra.threads",
|
||||
.value = "Represents the number of threads that will be used for database operations."},
|
||||
KV{.key = "database.cassandra.provider",
|
||||
.value = "The specific database backend provider we are using. Currently we only support scylladb, or "
|
||||
.value = "The specific database backend provider we are using. Currently we only support cassandra, or "
|
||||
"aws_keyspace."},
|
||||
KV{.key = "database.cassandra.core_connections_per_host",
|
||||
.value = "The number of core connections per host for the Cassandra database."},
|
||||
|
||||
@@ -53,7 +53,7 @@ protected:
|
||||
{"database.cassandra.secure_connect_bundle", ConfigValue{ConfigType::String}.optional()},
|
||||
{"database.cassandra.port", ConfigValue{ConfigType::Integer}.optional()},
|
||||
{"database.cassandra.keyspace", ConfigValue{ConfigType::String}.defaultValue(kKEYSPACE)},
|
||||
{"database.cassandra.provider", ConfigValue{ConfigType::String}.defaultValue("scylladb")},
|
||||
{"database.cassandra.provider", ConfigValue{ConfigType::String}.defaultValue("cassandra")},
|
||||
{"database.cassandra.replication_factor", ConfigValue{ConfigType::Integer}.defaultValue(1)},
|
||||
{"database.cassandra.table_prefix", ConfigValue{ConfigType::String}.optional()},
|
||||
{"database.cassandra.max_write_requests_outstanding", ConfigValue{ConfigType::Integer}.defaultValue(10'000)},
|
||||
|
||||
@@ -93,7 +93,7 @@ protected:
|
||||
{"database.cassandra.port", ConfigValue{ConfigType::Integer}.optional()},
|
||||
{"database.cassandra.keyspace",
|
||||
ConfigValue{ConfigType::String}.defaultValue(TestGlobals::instance().backendKeyspace)},
|
||||
{"database.cassandra.provider", ConfigValue{ConfigType::String}.defaultValue("scylladb")},
|
||||
{"database.cassandra.provider", ConfigValue{ConfigType::String}.defaultValue("cassandra")},
|
||||
{"database.cassandra.replication_factor", ConfigValue{ConfigType::Integer}.defaultValue(1)},
|
||||
{"database.cassandra.table_prefix", ConfigValue{ConfigType::String}.optional()},
|
||||
{"database.cassandra.max_write_requests_outstanding", ConfigValue{ConfigType::Integer}.defaultValue(10'000)},
|
||||
|
||||
@@ -59,7 +59,7 @@ getParseSettingsConfig(boost::json::value val)
|
||||
{"database.cassandra.certificate", ConfigValue{ConfigType::String}.optional()},
|
||||
{"database.cassandra.username", ConfigValue{ConfigType::String}.optional()},
|
||||
{"database.cassandra.password", ConfigValue{ConfigType::String}.optional()},
|
||||
{"database.cassandra.provider", ConfigValue{ConfigType::String}.defaultValue("scylladb")},
|
||||
{"database.cassandra.provider", ConfigValue{ConfigType::String}.defaultValue("cassandra")},
|
||||
{"database.cassandra.queue_size_io", ConfigValue{ConfigType::Integer}.optional()},
|
||||
{"database.cassandra.write_batch_size", ConfigValue{ConfigType::Integer}.defaultValue(20)},
|
||||
{"database.cassandra.connect_timeout", ConfigValue{ConfigType::Integer}.optional()},
|
||||
|
||||
Reference in New Issue
Block a user