You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Andres de la Peña (Jira)" <ji...@apache.org> on 2022/05/06 11:29:00 UTC
[jira] [Comment Edited] (CASSANDRA-17544) Add EnableFlag to guardrails API
[ https://issues.apache.org/jira/browse/CASSANDRA-17544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17532789#comment-17532789 ]
Andres de la Peña edited comment on CASSANDRA-17544 at 5/6/22 11:28 AM:
------------------------------------------------------------------------
Running CI with repeated runs after rebase+squash one last time before commit:
||Patch||CI||
|[trunk|https://github.com/adelapena/cassandra/commit/8cda8e6ffb8106168585cd2b6fcd7ca6cc64ec12]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1527/workflows/550363ae-af9a-46c9-a2e0-7b3f6aa79f9c] [j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/1527/workflows/78665199-6c78-45f7-9e51-6569eccbfe3c]|
I have moved the entry in {{CHANGES.txt}} to the section for 4.2, which is the current trunk. I've also fixed some trivial alignment issues on {{{}EnableFlag{}}}'s JavaDoc.
was (Author: adelapena):
Running CI one last time before commit:
||Patch||CI||
|[trunk|https://github.com/adelapena/cassandra/commit/8cda8e6ffb8106168585cd2b6fcd7ca6cc64ec12]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1527/workflows/550363ae-af9a-46c9-a2e0-7b3f6aa79f9c] [j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/1527/workflows/78665199-6c78-45f7-9e51-6569eccbfe3c]|
I have moved the entry in {{CHANGES.txt}} to the section for 4.2, which is the current trunk. I've also fixed some trivial alignment issues on {{{}EnableFlag{}}}'s JavaDoc.
> Add EnableFlag to guardrails API
> --------------------------------
>
> Key: CASSANDRA-17544
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17544
> Project: Cassandra
> Issue Type: Improvement
> Components: Feature/Guardrails
> Reporter: Josh McKenzie
> Assignee: Bernardo Botella Corbi
> Priority: Low
> Fix For: 4.x
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Currently we only have a DisableFlag which, for guardrails where we're enabling or disabling a feature, leads to some pretty odd ergonomics in the code. For example:
>
> {code:java}
> public static final DisableFlag compactTablesEnabled =
> new DisableFlag("compact_tables",
> state -> !CONFIG_PROVIDER.getOrCreate(state).getCompactTablesEnabled(),
> "Creation of new COMPACT STORAGE tables"); {code}
> So far, the usage of these toggle flags appears to be skewed heavily towards the inverse, or an EnableFlag that'd look something like this:
> {code:java}
> public static final EnableFlag featureEnabled = new EnableFlag("feature_name", state -> CONFIG_PROVIDER.getOrCreate(state).getCompactTablesEnabled(), "Text for feature"); {code}
> While it's a relatively small change it'll help tidy up some of the guardrails framework and make the logic clearer.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org