maedhroz commented on code in PR #2961:
URL: https://github.com/apache/cassandra/pull/2961#discussion_r1420888043
##########
src/java/org/apache/cassandra/db/guardrails/Guardrails.java:
##########
@@ -477,6 +478,21 @@ public final class Guardrails implements GuardrailsMBean
format("The modification to table %s has a timestamp %s
before the minimum allowable %s threshold %s",
what, value, isWarning ? "warning" : "failure",
threshold));
+ public static final MaxThreshold
maximumReferencedIndexesWithNonParitionRestrictedQuery =
+ new
MaxThreshold("maximum_referenced_indexes_for_non_paritition_key_restricted_query",
Review Comment:
nit: Make sure naming is consistent at the end w/ what's in the YAML and
`Config`
##########
src/java/org/apache/cassandra/db/guardrails/Guardrails.java:
##########
@@ -477,6 +478,21 @@ public final class Guardrails implements GuardrailsMBean
format("The modification to table %s has a timestamp %s
before the minimum allowable %s threshold %s",
what, value, isWarning ? "warning" : "failure",
threshold));
+ public static final MaxThreshold
maximumReferencedIndexesWithNonParitionRestrictedQuery =
+ new
MaxThreshold("maximum_referenced_indexes_for_non_paritition_key_restricted_query",
+ "High number of referenced indexes per query may
negatively effect performance",
+ state ->
CONFIG_PROVIDER.getOrCreate(state).getMaximumReferencedIndexesWithNonPartitionRestrictedQueryWarnThreshold(),
+ state ->
CONFIG_PROVIDER.getOrCreate(state).getMaximumReferencedIndexesWithNonPartitionRestrictedQueryFailThreshold(),
+ ((isWarning, what, value, threshold) ->
+ format("The number of referenced indexes on a table with
%s on index %s violated %s threshold value %s with value %s",
+ LeveledCompactionStrategy.class.getName(), what,
isWarning ? "warning" : "failure", threshold, value)));
+
+ public static final EnableFlag nonPartitionRestrictedQuery =
+ new EnableFlag("non_partition_restricted_query",
Review Comment:
nit: Make sure naming is consistent at the end w/ what's in the YAML and
`Config`
--
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]