[ 
https://issues.apache.org/jira/browse/CASSANDRA-20778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18009298#comment-18009298
 ] 

Stefan Miklosovic commented on CASSANDRA-20778:
-----------------------------------------------

4.1 
https://app.circleci.com/pipelines/github/instaclustr/cassandra/5870/workflows/ece15f4d-f2f7-409a-b76f-02deae6ab4a3

> Followup - Simplification of get/set guardrailsconfig after CASSANDRA-19552
> ---------------------------------------------------------------------------
>
>                 Key: CASSANDRA-20778
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-20778
>             Project: Apache Cassandra
>          Issue Type: Improvement
>          Components: Feature/Guardrails
>            Reporter: Stefan Miklosovic
>            Assignee: Stefan Miklosovic
>            Priority: Normal
>             Fix For: 4.1.x, 5.0.x, 5.x
>
>          Time Spent: 3h 40m
>  Remaining Estimate: 0h
>
> Together with [~mmuzaf] we realized that what we committed in CASSANDRA-19552 
> might be simplified and aligned quite a lot.
> The drawback of current solution is that we display guardrail names in "get" 
> command which do not correspond to the names of setters in "set" command when 
> we list the setters.
> We realized that we actually do not need setters list at all if we align name 
> of guardrails in get command with what it is set through in set command.
> Examples:
> {code}
> ./bin/nodetool getguardrailsconfig
> allow_filtering_enabled                   true        
> compact_tables_enabled                    true        
> drop_truncate_table_enabled               true        
> group_by_enabled                          true        
> read_before_write_list_operations_enabled true        
> secondary_indexes_enabled                 true        
> uncompressed_tables_enabled               true        
> user_timestamps_enabled                   true        
> collection_size_threshold                 [null, null]
> columns_per_table_threshold               [-1, -1]    
> data_disk_usage_percentage_threshold      [-1, -1]    
> fields_per_udt_threshold                  [11, 10]    
> in_select_cartesian_product_threshold     [-1, -1]    
> items_per_collection_threshold            [-1, -1]    
> keyspaces_threshold                       [-1, -1]    
> materialized_views_per_table_threshold    [-1, -1]    
> minimum_replication_factor_threshold      [-1, -1]    
> page_size_threshold                       [-1, -1]    
> partition_keys_in_select_threshold        [-1, -1]    
> secondary_indexes_per_table_threshold     [-1, -1]    
> tables_threshold                          [-1, -1]    
> read_consistency_levels_disallowed        []          
> read_consistency_levels_warned            []          
> table_properties_disallowed               []          
> table_properties_ignored                  []          
> table_properties_warned                   []          
> write_consistency_levels_disallowed       []          
> write_consistency_levels_warned           []          
> data_disk_usage_max_disk_size             null   
> {code}
> So if a user wants to set "keyspaces_threshold":
> {code}
> $ ./bin/nodetool setguardrailsconfig keyspaces_threshold 20 10
> ./bin/nodetool getguardrailsconfig keyspaces_threshold
> [20, 10]
> {code}
> Of course it is also possible to query individual name:
> {code}
>  ./bin/nodetool getguardrailsconfig keyspaces_warn_threshold
> 10
> {code}
> We will get raw name, as they are in yaml, via "verbose" flag:
> {code}
>  $ ./bin/nodetool getguardrailsconfig -v
> allow_filtering_enabled                     true
> compact_tables_enabled                      true
> drop_truncate_table_enabled                 true
> group_by_enabled                            true
> read_before_write_list_operations_enabled   true
> secondary_indexes_enabled                   true
> uncompressed_tables_enabled                 true
> user_timestamps_enabled                     true
> collection_size_fail_threshold              null
> collection_size_warn_threshold              null
> columns_per_table_fail_threshold            -1  
> columns_per_table_warn_threshold            -1  
> data_disk_usage_percentage_fail_threshold   -1  
> data_disk_usage_percentage_warn_threshold   -1  
> fields_per_udt_fail_threshold               11  
> fields_per_udt_warn_threshold               10  
> in_select_cartesian_product_fail_threshold  -1  
> in_select_cartesian_product_warn_threshold  -1  
> items_per_collection_fail_threshold         -1  
> items_per_collection_warn_threshold         -1  
> keyspaces_fail_threshold                    20  
> keyspaces_warn_threshold                    10  
> materialized_views_per_table_fail_threshold -1  
> materialized_views_per_table_warn_threshold -1  
> minimum_replication_factor_fail_threshold   -1  
> minimum_replication_factor_warn_threshold   -1  
> page_size_fail_threshold                    -1  
> page_size_warn_threshold                    -1  
> partition_keys_in_select_fail_threshold     -1  
> partition_keys_in_select_warn_threshold     -1  
> secondary_indexes_per_table_fail_threshold  -1  
> secondary_indexes_per_table_warn_threshold  -1  
> tables_fail_threshold                       -1  
> tables_warn_threshold                       -1  
> read_consistency_levels_disallowed          []  
> read_consistency_levels_warned              []  
> table_properties_disallowed                 []  
> table_properties_ignored                    []  
> table_properties_warned                     []  
> write_consistency_levels_disallowed         []  
> write_consistency_levels_warned             []  
> data_disk_usage_max_disk_size               null
> {code}
> This way of visualising "get" output is very handy as it will be also aligned 
> with CQL where thresholds will be stored in one CQL row instead of two (each 
> warn and fail) so the naming in CQL and the logic of setting it will be same 
> as for nodetool.



--
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

Reply via email to