apache/cassandra · error · ConfigurationException
Invalid value for ' ' repair sub-option - must be a boolean
Error message
Invalid value %s for '%s' repair sub-option - must be a boolean
What it means
AutoRepairParams.validate checks that the full_enabled sub-option parses as a boolean; anything else ('yes', '1', 'on', an empty string) throws ConfigurationException. This guards the table schema from storing an auto-repair setting that can never be evaluated.
Solutions
- Use the literal strings 'true' or 'false' for full_enabled
- Quote the value properly in the CQL options map
- Sanitize/validate the boolean in any tooling that generates the statement
Example fix
// before
WITH auto_repair = {'full_enabled': 'yes', ...}
// after
WITH auto_repair = {'full_enabled': 'true', ...} Defensive patterns
Strategy: validation
Validate before calling
String v = opts.get("full_enabled");
if (v != null && !v.equalsIgnoreCase("true") && !v.equalsIgnoreCase("false"))
throw new IllegalArgumentException("full_enabled must be true or false"); Try / catch
try { params.validate(); } catch (ConfigurationException e) { if (e.getMessage().contains("full_enabled") && e.getMessage().contains("boolean")) { /* coerce value to 'true'/'false' and retry */ } else throw e; } Prevention
- Only emit 'true'/'false' literals for boolean sub-options
- Centralize auto_repair map construction in one utility
- Lint generated CQL for boolean fields
When it happens
Trigger: ALTER TABLE ... WITH auto_repair = {'full_enabled': 'yes', ...} — any non-boolean literal for full_enabled.
Common situations: Users familiar with 'yes/no' or '1/0' conventions from other databases or YAML; generated configs interpolating wrong types into the CQL string.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- Cannot create table . with transactional mode with…
- enabled should either be 'true' or 'false', not
- Invalid caching sub-options
- Invalid value ' ' for caching sub-option ' ': only ' ' and…
- Invalid value ' ' for caching sub-option ' ': only ' ', '…
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/e405ae0a83aa07c8.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/schema/AutoRepairParams.java:114
public int priority()
{
String priority = options.getOrDefault(Option.PRIORITY.toString(), DEFAULT_OPTIONS.get(Option.PRIORITY.toString()));
return Integer.parseInt(priority);
}
public void validate()
{
for (Option option : Option.values())
{
if (!options.containsKey(LocalizeString.toLowerCaseLocalized(option.toString())))
{
throw new ConfigurationException(format("Missing repair sub-option '%s'", option));
}
}
if (options.get(LocalizeString.toLowerCaseLocalized(Option.FULL_ENABLED.toString())) != null && !isValidBoolean(options.get(LocalizeString.toLowerCaseLocalized(Option.FULL_ENABLED.toString()))))
{
throw new ConfigurationException(format("Invalid value %s for '%s' repair sub-option - must be a boolean",
options.get(LocalizeString.toLowerCaseLocalized(Option.FULL_ENABLED.toString())),
Option.FULL_ENABLED));
}
if (options.get(LocalizeString.toLowerCaseLocalized(Option.INCREMENTAL_ENABLED.toString())) != null && !isValidBoolean(options.get(LocalizeString.toLowerCaseLocalized(Option.INCREMENTAL_ENABLED.toString()))))
{
throw new ConfigurationException(format("Invalid value %s for '%s' repair sub-option - must be a boolean",
options.get(LocalizeString.toLowerCaseLocalized(Option.INCREMENTAL_ENABLED.toString())),
Option.INCREMENTAL_ENABLED));
}
if (options.get(LocalizeString.toLowerCaseLocalized(Option.PREVIEW_REPAIRED_ENABLED.toString())) != null && !isValidBoolean(options.get(LocalizeString.toLowerCaseLocalized(Option.PREVIEW_REPAIRED_ENABLED.toString()))))
{
throw new ConfigurationException(format("Invalid value %s for '%s' repair sub-option - must be a boolean",
options.get(LocalizeString.toLowerCaseLocalized(Option.PREVIEW_REPAIRED_ENABLED.toString())),
Option.PREVIEW_REPAIRED_ENABLED));
}
if (options.get(LocalizeString.toLowerCaseLocalized(Option.PRIORITY.toString())) != null && !isValidInt(options.get(LocalizeString.toLowerCaseLocalized(Option.PRIORITY.toString()))))
{
throw new ConfigurationException(format("Invalid value %s for '%s' repair sub-option - must be an integer",View on GitHub (pinned to 88fd0f6a0e)