apache/cassandra · error · ConfigurationException

Unrecognized fast path options provided:

Error message

Unrecognized fast path options provided: 

What it means

After extracting the recognized options ('size' and 'dcs'), fromMap() checks whether any keys remain in the input map. Any leftover key means an unknown/misspelled option was supplied, and a ConfigurationException listing the unrecognized keys is thrown. This strictness prevents silently ignoring typos in strategy configuration.

Solutions

  1. Remove the unrecognized keys; only 'size' and 'dcs' are accepted
  2. Fix typos in option names (check the exact spelling of 'size' and 'dcs')
  3. Check the error message's key list to identify exactly which keys to drop or rename

Example fix

// before
Map<String,String> opts = Map.of("size", "10", "dc", "dc1");
ParameterizedFastPathStrategy.fromMap(opts); // throws: unrecognized "dc"
// after
Map<String,String> opts = Map.of("size", "10", "dcs", "dc1");
ParameterizedFastPathStrategy.fromMap(opts); // ok
Defensive patterns

Strategy: validation

Validate before calling

Set<String> allowed = Set.of("size", "dcs");
Set<String> unknown = new HashSet<>(map.keySet());
unknown.removeAll(allowed);
if (!unknown.isEmpty())
    throw new IllegalArgumentException("unknown fast-path options: " + unknown);

Prevention

When it happens

Trigger: Calling fromMap() with a map containing keys other than 'size' and 'dcs', e.g. {"sizes": "10"}, {"dc": "dc1"}, or arbitrary extra options.

Common situations: Typos in option names ('sizes', 'dcs ' with trailing space); reusing option maps built for a different Accord strategy kind; older/newer option names across version changes.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/7eab3fc5ec8a6054. Report an issue: GitHub.

Appendix: source

Thrown at src/java/org/apache/cassandra/service/accord/topology/ParameterizedFastPathStrategy.java:300

                {
                    if (hasAuto) throw cfe("Cannot mix auto and manual DC weights");
                    hasManual = true;
                }

                mutableDcs.put(dc.name, dc);
            }
            dcMap = ImmutableMap.copyOf(mutableDcs);
        }
        else
        {
            dcMap = ImmutableMap.of();
        }

        Set<String> keys = new HashSet<>(map.keySet());
        keys.remove(SIZE);
        keys.remove(DCS);
        if (!keys.isEmpty())
            throw cfe("Unrecognized fast path options provided: ", keys);

        return new ParameterizedFastPathStrategy(size, dcMap);
    }

    @Override
    public Kind kind()
    {
        return Kind.PARAMETERIZED;
    }

    @VisibleForImplementation
    public Iterable<String> dcStrings()
    {
        return dcs.values().stream().sorted().map(Object::toString).collect(Collectors.toList());
    }

    @Override
    public String toString()

View on GitHub (pinned to 88fd0f6a0e)