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

  1. Use 'simple', 'up', or a well-formed {'size':n,'dcs':dc0,dc1...} string for the keyspace strategy.
  2. Remove 'keyspace' as the value here — it is only valid for the table strategy.
  3. 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

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


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)