apache/cassandra · error · ConfigurationException
Fast path strategy must either be 'keyspace', 'simple'…
Error message
Fast path strategy must either be 'keyspace', 'simple', 'up' or a map size and optional dcs {'size':n, 'dcs': dc0,dc1... What it means
Parses the accord.fast_path table strategy string from configuration. Only 'keyspace', 'simple', 'up', or a JSON-ish map form {'size':n,'dcs':...} is accepted; any other string raises a ConfigurationException at strategy parsing time. This fails fast on invalid config so the cluster does not start with an unusable fast-path policy.
Solutions
- Set the strategy to one of: keyspace, simple, up, or a well-formed {'size':n,'dcs':dc0,dc1...} string.
- Check spelling and remove stray whitespace or quotes introduced by YAML.
- Validate the config with a startup dry-run after editing cassandra.yaml.
Example fix
// before (cassandra.yaml)
accord:
fast_path:
table_strategy: 'KeySpace '
// after
accord:
fast_path:
table_strategy: keyspace Defensive patterns
Strategy: validation
Validate before calling
String s = value.trim().toLowerCase();
boolean ok = s.equals("keyspace") || s.equals("simple") || s.equals("up")
|| s.matches("\\{'size'\\s*:\\s*\\d+\\s*(,\\s*'dcs'\\s*:\\s*[^}]+)?\\}");
if (!ok) throw new ConfigurationException("Invalid fast_path table strategy: " + value); Try / catch
try {
FastPathStrategy strategy = FastPathStrategy.tableStrategyFromString(raw);
} catch (ConfigurationException e) {
logger.error("Bad accord.fast_path config; falling back to default", e);
strategy = FastPathStrategy.simple();
} Prevention
- Validate cassandra.yaml fast_path settings on config load
- Avoid quotes/whitespace mangling in YAML string values
- Copy only documented strategy strings
- Test config changes in a staging cluster first
When it happens
Trigger: Calling tableStrategyFromString with a string that matches none of 'keyspace', 'simple', 'up', nor a valid map spec — typically a typo like 'KeySpace' with different casing/handling, or a malformed map string.
Common situations: Typo in cassandra.yaml accord.fast_path setting; quoting/escaping issues in YAML mangling the map syntax; copy-pasting a keyspace-allowed keyword that the table strategy parser does not accept.
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
- Fast path strategy must either be 'simple', 'up' or a map…
- accord.cache_size option was set incorrectly to
- accord.journal_directory must be specified
- accord.journal_directory must not be the same as any…
- Cannot change transactional mode to
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/1e8bd681f1de31a0.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/service/accord/topology/FastPathStrategy.java:136
return inheritKeyspace();
case UP:
return up();
default:
throw new IllegalArgumentException("Unhandled strategy kind: " + kind);
}
}
static FastPathStrategy tableStrategyFromString(String s)
{
s = toLowerCaseLocalized(s).trim();
if (s.equals("keyspace"))
return InheritKeyspaceFastPathStrategy.instance;
if (s.equals("simple"))
return SimpleFastPathStrategy.instance;
if (s.equals("up"))
return UpFastPathStrategy.instance;
throw new ConfigurationException("Fast path strategy must either be 'keyspace', 'simple', 'up' or a map size and optional dcs {'size':n, 'dcs': dc0,dc1...");
}
static FastPathStrategy keyspaceStrategyFromString(String s)
{
s = toLowerCaseLocalized(s).trim();
if (s.equals("simple"))
return SimpleFastPathStrategy.instance;
if (s.equals("up"))
return UpFastPathStrategy.instance;
throw new ConfigurationException("Fast path strategy must either be 'simple', 'up' or a map size and optional dcs {'size':n, 'dcs': dc0,dc1...");
}
static FastPathStrategy simple()
{
return SimpleFastPathStrategy.instance;
}
View on GitHub (pinned to 88fd0f6a0e)