[
https://issues.apache.org/jira/browse/CASSANDRA-19553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18004125#comment-18004125
]
Stefan Miklosovic commented on CASSANDRA-19553:
-----------------------------------------------
trunk: https://github.com/apache/cassandra/pull/3246
5.0: https://github.com/apache/cassandra/pull/4236
> get/set guardrails configuration via CQL
> ----------------------------------------
>
> Key: CASSANDRA-19553
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19553
> Project: Apache Cassandra
> Issue Type: New Feature
> Components: Feature/Guardrails, Feature/Virtual Tables
> Reporter: Stefan Miklosovic
> Assignee: Stefan Miklosovic
> Priority: Normal
> Fix For: 5.x
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> In CASSANDRA-19552, there is a patch which modifies guardrails via nodetool
> and via reflection.
> I think that it will be better if we do that via CQL.
> So far, I have this:
> {code}
> cqlsh> select * from system_views.guardrails_threshold ;
> name | fail | warn
> -------------------------------+-------+-------
> collection_size | 0 | 0
> column_value_size | -1 | -1
> columns_per_table | -1 | -1
> fields_per_udt | -1 | -1
> in_select_cartesian_product | -1 | -1
> items_per_collection | -1 | -1
> keyspaces | -1 | -1
> materialized_views_per_table | -1 | -1
> maximum_replication_factor | -1 | -1
> maximum_timestamp | 0 | 0
> minimum_replication_factor | -1 | -1
> minimum_timestamp | 0 | 0
> page_size | -1 | -1
> partition_keys_in_select | -1 | -1
> partition_size | 40960 | 20480
> partition_tombstones | -1 | -1
> sai_sstable_indexes_per_query | -1 | 32
> secondary_indexes_per_table | -1 | -1
> tables | -1 | -1
> vector_dimensions | -1 | -1
> {code}
> {code}
> cqlsh> update system_views.guardrails_threshold SET warn = 16, fail = 20
> where name = 'sai_sstable_indexes_per_query';
> {code}
> {code}
> cqlsh> select * from system_views.guardrails_threshold where name =
> 'sai_sstable_indexes_per_query';
> name | fail | warn
> -------------------------------+------+------
> sai_sstable_indexes_per_query | 20 | 16
> {code}
> {code}
> INFO [Native-Transport-Requests-1] 2024-04-11 11:51:24,483
> GuardrailsOptions.java:998 - Updated
> sai_sstable_indexes_per_query_warn_threshold from 32 to 16
> INFO [Native-Transport-Requests-1] 2024-04-11 11:51:24,483
> GuardrailsOptions.java:998 - Updated
> sai_sstable_indexes_per_query_fail_threshold from -1 to 20
> {code}
> {code}
> cqlsh> update system_views.guardrails_threshold SET warn = 10, fail = 5 where
> name = 'sai_sstable_indexes_per_query';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="The
> warn threshold 10 for sai_sstable_indexes_per_query_warn_threshold should be
> lower than the fail threshold 5"
> {code}
> We can easily extend this to EnableFlag guardrails for which we would
> dedicate a separate table (system_views.guadrails_flag).
> Other guardrail types are being investigated.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]