[
https://issues.apache.org/jira/browse/CASSANDRA-17188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17490133#comment-17490133
]
Andres de la Peña commented on CASSANDRA-17188:
-----------------------------------------------
CASSANDRA-17353 has flattened the configuration for guardrails, so we can
continue progress with this new guardrail.
Here is the rebased patch:
||PR||CI||
|[trunk|https://github.com/apache/cassandra/pull/1392]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1293/workflows/a08fafd4-36bf-4155-9ec2-2e996de5e3fe]
[j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/1293/workflows/e1ee6c0e-6522-4c31-9be9-f5a93b330536]|
Other than the flat format of the config properties the patch is identical, so
the initial comments to the approach stand. I'm repeating them hereunder for
convenience, with updated links.
Some queries can trigger internal queries that use a different consistency
level than that specified for the user. For example, certain write operations
on lists can [trigger an internal read|#L396]. As another example, the
different phases of Paxos in LWT can [internally use multiple consistency
levels|https://github.com/apache/cassandra/blob/07c7f943d4531f7f8a2322d691d0ef89a18a03f1/src/java/org/apache/cassandra/service/StorageProxy.java#L444-L446].
These internal consistency levels are not verified by the proposed guardrails,
which are only applied to the regular and serial consistency levels explicitly
specified by the user.
The patch modifies [the existing {{Values}} type of
guardrail|https://github.com/apache/cassandra/blob/ce7502a11067ef903cba24ad588cf0a5b9da9257/src/java/org/apache/cassandra/db/guardrails/Values.java#L40-L41]
to have [a list of {{warned}}
values|https://github.com/apache/cassandra/blob/07c7f943d4531f7f8a2322d691d0ef89a18a03f1/src/java/org/apache/cassandra/db/guardrails/Values.java#L41-L43].
I think that this set of {{warned}} values can also be useful for the already
existing guardrail for table properties. I have modified that guardrail to also
include warned properties, in addition to the current sets of ignored and
disallowed properties:
{code:java}
# Guardrail to warn about, ignore or reject properties when creating tables.
table_properties_warned: []
table_properties_ignored: []
table_properties_disallowed: []
{code}
> Guardrails for consistency levels
> ---------------------------------
>
> Key: CASSANDRA-17188
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17188
> Project: Cassandra
> Issue Type: New Feature
> Components: Feature/Guardrails
> Reporter: Andres de la Peña
> Assignee: Andres de la Peña
> Priority: Normal
> Fix For: 4.x
>
>
> Add guardrails for read/write consistency levels, for example:
> {code:java}
> # Guardrail to warn about or reject read consistency levels.
> # By default all consistency levels are allowed.
> read_consistency_levels:
> warned: []
> disallowed: []
> # Guardrail to warn about or reject write consistency levels.
> # By default all consistency levels are allowed.
> write_consistency_levels:
> warned: []
> disallowed: []
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]