Skip to content

[storage.cassandra] accepts unknown keys silently #540

Open

Description

@LeeroyHannigan

CassandraStorageConfig (crates/storage-cassandra/src/config.rs:11) is the one configuration struct without #[serde(deny_unknown_fields)]. Every other section, including PostgresStorageConfig (crates/storage-postgres/src/config.rs:10), refuses to start on an unknown key with an "unknown field" error. In [storage.cassandra] a misspelled key (replication_factr = 3) or a key from another backend is ignored silently and the default applies.

The configuration reference (#537) names the exception. The fix is the one attribute, plus a test that a misspelled key fails deserialization, and a check of the deployment fixtures and the init template for any key the struct does not have, since those would start failing. It changes what the server accepts, which is why it is not part of the documentation change.

Found while checking every configuration key against the code that reads it, for #494.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

backend:cassandraRelated to the Cassandra backend specifically

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions