apache/cassandra · error · ConfigurationException

Configuration entry %s inherits non-existing entry %s.

Error message

Configuration entry %s inherits non-existing entry %s.

What it means

Thrown from MemtableParams.expandDefinitions when a memtable configuration entry's 'inherits' references a named entry that does not exist in memtable_configurations and is not the special 'default' key. Cassandra cannot resolve the inheritance chain, so configuration parsing fails with a ConfigurationException.

Source

Thrown at src/java/org/apache/cassandra/schema/MemtableParams.java:161

        LinkedHashMap<String, ParameterizedClass> configs = new LinkedHashMap<>(memtableConfigurations.size() + 1);

        // If default is not overridden, add an entry first so that other configurations can inherit from it.
        // If it is, process it in its point of definition, so that the default can inherit from another configuration.
        if (!memtableConfigurations.containsKey(DEFAULT_CONFIGURATION_KEY))
            configs.put(DEFAULT_CONFIGURATION_KEY, DEFAULT_CONFIGURATION);

        Map<String, InheritingClass> inheritingClasses = new LinkedHashMap<>();

        for (Map.Entry<String, InheritingClass> entry : memtableConfigurations.entrySet())
        {
            if (entry.getValue().inherits != null)
            {
                if (entry.getKey().equals(entry.getValue().inherits))
                    throw new ConfigurationException(String.format("Configuration entry %s can not inherit itself.", entry.getKey()));

                if (memtableConfigurations.get(entry.getValue().inherits) == null && !entry.getValue().inherits.equals(DEFAULT_CONFIGURATION_KEY))
                    throw new ConfigurationException(String.format("Configuration entry %s inherits non-existing entry %s.",
                                                                   entry.getKey(), entry.getValue().inherits));

                inheritingClasses.put(entry.getKey(), entry.getValue());
            }
            else
                configs.put(entry.getKey(), entry.getValue().resolve(configs));
        }

        for (Map.Entry<String, InheritingClass> inheritingEntry : inheritingClasses.entrySet())
        {
            String inherits = inheritingEntry.getValue().inherits;
            while (inherits != null)
            {
                InheritingClass nextInheritance = inheritingClasses.get(inherits);
                if (nextInheritance == null)
                    inherits = null;
                else
                    inherits = nextInheritance.inherits;

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Fix the inherits value in cassandra.yaml to reference an actually defined entry name.
  2. Define the missing base entry in memtable_configurations if it was intended.
  3. Use the literal key 'default' if inheriting the default configuration.
  4. Remove the inherits line if inheritance is not needed.

Example fix

# before (cassandra.yaml)
memtable_configurations:
  small:
    inherits: smal   # typo
# after
memtable_configurations:
  small:
    inherits: default
Defensive patterns

Strategy: validation

Validate before calling

# pre-check inherits targets exist
python3 -c "import yaml; c=yaml.safe_load(open('conf/cassandra.yaml')); mc=c.get('memtable_configurations',{}); [print('bad inherits:',k,'->',v.get('inherits')) for k,v in mc.items() if isinstance(v,dict) and v.get('inherits') and v['inherits'] not in mc and v['inherits']!='default']"

Prevention

When it happens

Trigger: cassandra.yaml: memtable_configurations entry 'a: {inherits: b}' where no entry named 'b' is defined (and inherits != 'default'); runs at node startup while building CONFIGURATION_DEFINITIONS.

Common situations: Typo in the inherits target name, deleting/renaming a base entry while children still point to it, copy-pasting config from another cluster whose entry names differ, misspelling 'default' when intending the built-in key.

Related errors


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