apache/cassandra · error · ConfigurationException
Fast path strategy must either be 'simple', 'up' or a map…
Error message
Fast path strategy must either be 'simple', 'up' or a map size and optional dcs {'size':n, 'dcs': dc0,dc1... What it means
Parses the accord.fast_path keyspace strategy string. Only 'simple', 'up', or a map form {'size':n,'dcs':...} is accepted (note: unlike the table strategy, 'keyspace' itself is not allowed here since it would be recursive); anything else throws ConfigurationException. It fails fast at configuration parse time.
Solutions
- Use 'simple', 'up', or a well-formed {'size':n,'dcs':dc0,dc1...} string for the keyspace strategy.
- Remove 'keyspace' as the value here — it is only valid for the table strategy.
- Re-check the config after edits and restart/validate to confirm parsing succeeds.
Example fix
// before fast_path_strategy: keyspace // after fast_path_strategy: simple
Defensive patterns
Strategy: validation
Validate before calling
String s = value.trim().toLowerCase();
boolean ok = s.equals("simple") || s.equals("up")
|| s.matches("\\{'size'\\s*:\\s*\\d+\\s*(,\\s*'dcs'\\s*:\\s*[^}]+)?\\}");
if (!ok) throw new ConfigurationException("Invalid keyspace fast_path strategy: " + value); Try / catch
try {
FastPathStrategy strategy = FastPathStrategy.keyspaceStrategyFromString(raw);
} catch (ConfigurationException e) {
logger.error("Bad keyspace fast_path strategy; using default", e);
strategy = FastPathStrategy.simple();
} Prevention
- Remember 'keyspace' is not a valid value for the keyspace-level strategy
- Validate strategy strings before applying via ALTER or config
- Trim and lowercase input before comparison
When it happens
Trigger: Calling keyspaceStrategyFromString with a string other than 'simple', 'up', or a valid map spec — e.g. setting the keyspace strategy to 'keyspace', or a typo/malformed map.
Common situations: Setting the per-keyspace fast path strategy to 'keyspace' by mistake (valid only for the table strategy); typos in cassandra.yaml or in ALTER statements configuring keyspace fast path; YAML quoting mangling the map syntax.
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 'keyspace', 'simple'…
- 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/472f26270fdcca39.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/service/accord/topology/FastPathStrategy.java:147
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;
}
static FastPathStrategy up()
{
return UpFastPathStrategy.instance;
}
static FastPathStrategy inheritKeyspace()
{
return InheritKeyspaceFastPathStrategy.instance;
}
MetadataSerializer<FastPathStrategy> serializer = new MetadataSerializer<FastPathStrategy>()View on GitHub (pinned to 88fd0f6a0e)