apache/cassandra · error · ConfigurationException

Configuration entry %s can not inherit itself.

Error message

Configuration entry %s can not inherit itself.

What it means

Thrown from MemtableParams.expandDefinitions while parsing cassandra.yaml memtable configurations: a named memtable configuration entry declares an 'inherits' that points at itself. Self-inheritance cannot be resolved, so configuration parsing fails with a ConfigurationException.

Source

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

    {
        if (memtableConfigurations == null)
            return ImmutableMap.of(DEFAULT_CONFIGURATION_KEY, DEFAULT_CONFIGURATION);

        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)

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Edit cassandra.yaml so the entry's inherits points at a DIFFERENT existing entry (or remove inherits entirely).
  2. Remove the 'inherits' field if the entry should define its own class_name/parameters directly.
  3. Restart after fixing; validate YAML structure to ensure the key/value were not accidentally duplicated.

Example fix

# before (cassandra.yaml)
memtable_configurations:
  small:
    inherits: small
    class_name: DefaultMemtable
# after
memtable_configurations:
  small:
    inherits: default
    class_name: DefaultMemtable
Defensive patterns

Strategy: validation

Validate before calling

# pre-check your YAML before node startup
python3 -c "import yaml; c=yaml.safe_load(open('conf/cassandra.yaml')); mc=c.get('memtable_configurations',{}); [print('self-inherit:',k) for k,v in mc.items() if isinstance(v,dict) and v.get('inherits')==k]"

Prevention

When it happens

Trigger: cassandra.yaml contains memtable_configurations with an entry like 'small: {inherits: small, class_name: ...}' — entry key equals its own inherits value; expandDefinitions runs when building CONFIGURATION_DEFINITIONS at startup.

Common situations: Hand-editing cassandra.yaml and copy-pasting an inherits line without changing it, templating tools substituting the same key for both entry name and inherits.

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/57440db356f9d031. Report an issue: GitHub.