Skip to content

Conversation

@maxim-chn
Copy link

The change description is available at https://issues.apache.org/jira/browse/CASSANDRA-17919 patch submission, as it involves multiple versions.

In short, I've fixed how Lexer.g recognizes 0 duration token in ISO 8601 format and updated unit tests to cover the change.

The Cassandra Jira

michaelsembwever added a commit to thelastpickle/cassandra that referenced this pull request Jan 7, 2026
There are now three profiles for guardrail defaults: none|dbaas|hcd

This redoes the work in 7940e9c
The defaults introduced previously (as new non-dbaas defaults) are now
applied to the hcd profile.

--

HCD-179 Guardrail defaults for on-prem
Provide users defaults and feedback from startup checks/warnings
sensible for production environments. Many users do not (and do not want
to) understand the complexities of HCD/Cassandra, and such feedback
helps them stay safely dumb. This is also expected to alleviate the
impact on Support having to deal will silly abuses of the database. It
is also avoids operators having to retrospectively police their
developers creating the data models and client applications.

Set on-prem guardrail defaults to be (keeping in mind these can be
changed by operators on-prem, so they are first and foremost important
teachings to give):

  columns_per_table_failure_threshold: 200
  fields_per_udt_failure_threshold: 100
  collection_size_warn_threshold_in_kb: 10240
  items_per_collection_warn_threshold: 200
  secondary_index_per_table_failure_threshold: 0
  sasi_indexes_per_table_failure_threshold: 0
  materialized_view_per_table_failure_threshold: 0
  tables_warn_threshold: 100
  tables_failure_threshold: 200
  in_select_cartesian_product_failure_threshold: 25
  partition_keys_in_select_failure_threshold: 20
  disk_usage_percentage_warn_threshold: 70
  write_consistency_levels_disallowed: ANY

Also add a startup warning when SimpleSnitch is used.

### What is the issue
Sets appropriate startup checks, and guardrail defaults under a new HCD
profile.

### What does this PR fix and why was it fixed
Introduces a new yaml setting `hcd_guardrail_defaults` and a set of
defaults when it's set true in GuardrailsConfig. These defaults are
applied when the yaml hasn't provided values.
Default settings have not otherwise changed if hcd_guardrail_defaults
has not been set.
An assertion is thrown if both `hcd_guardrail_defaults` and
`emulate_dbaas_defaults` is set true.

### CNDB testing

riptano/cndb#14958

---------

Co-authored-by: mck <mck@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants