[
https://issues.apache.org/jira/browse/CASSANDRA-17551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17525327#comment-17525327
]
Ekaterina Dimitrova commented on CASSANDRA-17551:
-------------------------------------------------
{quote}The advantage of using 0 as disabled value is that config would be
briefer than adding separate properties. Maybe we could modify {{Threshold}}
guardrails to include the functionalities of {{{}DisableFlag{}}}, which are an
{{ensureEnabled}} method and a separate warn/error message for the particular
case of 0. That would be useful not only for size-based guardrails but also for
numeric guardrails such as, for example,
{{{}materialized_views_per_table_warn_threshold{}}}/{{{}materialized_views_per_table_fail_threshold{}}},
where 0 would disallow or warn about MV creation in general, independently of
the number of MVs. wdyt?
{quote}
I like this. I agree that it will be nice not to overwhelm more config but at
the same time additional check/method at the right places only for
_ensureEnabled_ sounds very reasonable to me. I will try to add it tomorrow
morning. Hope you can review these days :)
> 0KiB should be used to prohibit collections and not to disable the guardrails
> collection_size_warn_threshold and collection_size_fail_threshold
> -----------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-17551
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17551
> Project: Cassandra
> Issue Type: Bug
> Components: Feature/Guardrails
> Reporter: Ekaterina Dimitrova
> Assignee: Ekaterina Dimitrova
> Priority: Normal
> Fix For: 4.x
>
>
> # The two thresholds default to 0KiB to disable.
> # collection_size_warn_threshold: 0KiB
> # collection_size_fail_threshold: 0KiB
> 0KiB should be used to prohibit collections and not to disable the guardrail.
> Disabled should be null as we moved to that as part of CASSANDRA-17431 while
> investigating other config corner cases.
> Old config which had -1 for disable will be converted internally to null with
> the new config types and new config should use null for disable. Of course,
> disabling 0 as a non-valid value is a different story which should be handled
> on per-case basis.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]