[
https://issues.apache.org/jira/browse/CASSANDRA-20749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18013899#comment-18013899
]
Paulo Motta commented on CASSANDRA-20749:
-----------------------------------------
{quote}But this seems to be impossible: memtable.configurations.skiplist:
{\"class_name\": \"SkipListMemtable\", ....
{quote}
You are trying to insert a dynamic configuration, since this can take a
free-form property name, the same would work in the yaml:
memtable.configurations.my_skiplist: {\"class_name\": \"SkipListMemtable\", ....
I faced the same issue while trying to override specific {{startup_checks}} and
decided to not fix it. In that case though the number of possibilities is
finite so it may be possible to support it more easily. I think rather than
starting from the property/env name and derive a configuration from it we would
need to take the opposite route: start from the config name, and check if there
any properties/envs matching that.
The original goal of the ticket was to override static properties not dynamic
properties. It may be possible to support that, but I suspect not through the
existing mechanism, we would need to build something else. I think it's
acceptable to support only static properties initially and create a new ticket
to address dynamic configs later, since the large majority of properties is
static. Also it's not a big deal since you can still specify memtable
configurations as a whole, but not individual dynamic memtable configurations,
so this can be used as a workaround.
> Allow overriding arbitrary settings via environment variables
> -------------------------------------------------------------
>
> Key: CASSANDRA-20749
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20749
> Project: Apache Cassandra
> Issue Type: Improvement
> Components: Local/Config
> Reporter: Paulo Motta
> Assignee: Paulo Motta
> Priority: Normal
> Fix For: 5.x
>
> Time Spent: 4h
> Remaining Estimate: 0h
>
> Allow arbitrary cassandra.yaml settings to be overriden via environment
> variables. This allows performing runtime overrides to a cassandra node
> configuration without updating cassandra.yaml, what can be useful to test
> isolated changes or in docker environments where runtime environment
> variables can be supplied via the {{--env}} flag.
> This should transparently override arbitrary configuration supported in
> cassandra.yaml via environment variables loaded during startup matching the
> format {{{}CASS_{CASSANDRA_YAML_CONFIG_NAME{}}}}. So for example, to override
> the {{cassandra.yaml}} configuration cdc_enabled, this can be overriden via
> the environment variable {{{}CASS_CDC_ENABLED{}}}, the cassandra.yaml setting
> {{key_cache_save_period}} can be overriden via {{CASS_KEY_CACHE_SAVE_PERIOD}}
> and so on. This should support both simple and complex properties.
> This is analogous to the functionality added by CASSANDRA-17166 to override
> arbitrary configurations via system properties enabled by the flag
> {{{}-Dcassandra.config.allow_system_properties{}}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]