adelapena commented on code in PR #2369:
URL: https://github.com/apache/cassandra/pull/2369#discussion_r1210574220
##########
src/java/org/apache/cassandra/config/GuardrailsOptions.java:
##########
@@ -567,6 +568,31 @@ public void setPartitionSizeThreshold(@Nullable
DataStorageSpec.LongBytesBound w
x -> config.partition_size_fail_threshold =
x);
}
+ @Override
+ public long getPartitionTombstonesWarnThreshold()
+ {
+ return config.partition_tombstones_warn_threshold;
+ }
+
+ @Override
+ public long getPartitionTombstonesFailThreshold()
+ {
+ return config.partition_tombstones_fail_threshold;
+ }
+
+ public void setPartitionTombstonesThreshold(long warn, long fail)
+ {
+ validateMaxLongThreshold(warn, fail, "partition_tombstones", false);
+ updatePropertyWithLogging("partition_tombstones_warn_threshold",
Review Comment:
Indeed it's not ideal that we don't know the name of the yaml property that
will be written to the log output. The original prototype for guardrails had a
much more robust system of proper config objects for every guardrail, instead
of the current flat system. However, new nested configs were vetoed by a
committer until we moved the entire config file to a nested structure, even if
we already have some of them in the yaml. We haven't been still able to settle
on that new nested format, but I guess that when/if that happens this will be
less cumbersome.
I guess that for not repeating the name of the property we could try to read
its name from the `Config` var, or something like that. In any case, that looks
like a general refactor of the framework to be done in a separate ticket.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]