[ https://issues.apache.org/jira/browse/CASSANDRA-19553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17836121#comment-17836121 ]
Stefan Miklosovic commented on CASSANDRA-19553: ----------------------------------------------- Added enabled flags: {code} cqlsh> select * from system_views.guardrails_enable_flags ; name | value ----------------------------------------------+------- allow_filtering | True alter_table | True bulk_load_enabled | True compact_tables | True drop_keyspace_enabled | True drop_truncate_table_enabled | True group_by | True intersect_filtering_query | True non_partition_restricted_index_query_enabled | True read_before_write_list_operations | True secondary_indexes | True simplestrategy | True uncompressed_tables_enabled | False user_timestamps | True zero_ttl_on_twcs | True (15 rows) cqlsh> update system_views.guardrails_enable_flags SET value = false where name = 'group_by'; {code} {code} INFO [Native-Transport-Requests-1] 2024-04-11 13:15:51,861 GuardrailsOptions.java:998 - Updated group_by_enabled from true to false {code} {code} cqlsh> select value from system_views.guardrails_enable_flags where name = 'group_by'; value ------- False (1 rows) {code} > get/set guardrails configuration via CQL > ---------------------------------------- > > Key: CASSANDRA-19553 > URL: https://issues.apache.org/jira/browse/CASSANDRA-19553 > Project: Cassandra > Issue Type: New Feature > Reporter: Stefan Miklosovic > Assignee: Stefan Miklosovic > Priority: Normal > Time Spent: 10m > 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: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org