apache/cassandra · warning
Provided values are not recommended for (warned values are…
Error message
Provided values %s are not recommended for %s (warned values are: %s)
What it means
Values.guard intersects the provided values with the guardrail's 'warned' set. When any provided value falls in the warned set, this warning is emitted but the operation proceeds. It signals 'not recommended' usage without blocking it.
Solutions
- Replace the warned values with recommended alternatives.
- If usage is intentional, acknowledge the warning or tune the guardrail's warned threshold in cassandra.yaml.
- Escalate the guardrail to 'failed' in configuration if the values must never be used.
Example fix
// before
CREATE KEYSPACE ks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
// after (multi-DC cluster)
CREATE KEYSPACE ks WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': 3}; Defensive patterns
Strategy: validation
Validate before calling
Set<String> provided = parseOptions(statement);
Set<String> warned = guardrailsConfig.warnedValuesFor(what);
if (!Collections.disjoint(provided, warned)) {
logger.warn("Non-recommended options in use: {}", Sets.intersection(provided, warned));
} Prevention
- Follow version-specific best-practice option lists.
- Run guardrail checks in CI schema tests.
- Re-audit warned configurations after upgrades.
When it happens
Trigger: An operation supplies values configured in the guardrail's warned list (e.g. discouraged replication strategies, table options, feature settings) for the guardrail's 'what' category; also exercised by test harnesses (testValuesWarned).
Common situations: Clusters using settings flagged discouraged after an upgrade; schema copied from reference clusters using non-recommended options; capacity planners flagging dangerous defaults.
Understand the failure class
Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.
Related errors
- default_keyspace_rf to be set
- default_keyspace_rf to be set
- Dictionary file does not exist.
- Dictionary file is not correctly sorted for case-sensitive…
- Dictionary file is not readable.
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/b49b487232558285.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/db/guardrails/Values.java:127
Set<T> disallowed = disallowedValues.apply(state);
Set<T> toDisallow = Sets.intersection(values, disallowed);
if (!toDisallow.isEmpty())
fail(format("Provided values %s are not allowed for %s (disallowed values are: %s)",
toDisallow.stream().sorted().collect(Collectors.toList()), what, disallowed), state);
Set<T> ignored = ignoredValues.apply(state);
Set<T> toIgnore = Sets.intersection(values, ignored);
if (!toIgnore.isEmpty())
{
warn(format("Ignoring provided values %s as they are not supported for %s (ignored values are: %s)",
toIgnore.stream().sorted().collect(Collectors.toList()), what, ignored));
toIgnore.forEach(ignoreAction);
}
Set<T> warned = warnedValues.apply(state);
Set<T> toWarn = Sets.intersection(values, warned);
if (!toWarn.isEmpty())
warn(format("Provided values %s are not recommended for %s (warned values are: %s)",
toWarn.stream().sorted().collect(Collectors.toList()), what, warned));
}
}
View on GitHub (pinned to 88fd0f6a0e)