{"record":{"id":"42734437040515cf","repo":"apache/cassandra","slug":"configuration-entry-s-inherits-non-existing-entry","errorCode":null,"errorMessage":"Configuration entry %s inherits non-existing entry %s.","messagePattern":"Configuration entry (.+?) inherits non-existing entry (.+?)\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/schema/MemtableParams.java","lineNumber":161,"sourceCode":"\n        LinkedHashMap<String, ParameterizedClass> configs = new LinkedHashMap<>(memtableConfigurations.size() + 1);\n\n        // If default is not overridden, add an entry first so that other configurations can inherit from it.\n        // If it is, process it in its point of definition, so that the default can inherit from another configuration.\n        if (!memtableConfigurations.containsKey(DEFAULT_CONFIGURATION_KEY))\n            configs.put(DEFAULT_CONFIGURATION_KEY, DEFAULT_CONFIGURATION);\n\n        Map<String, InheritingClass> inheritingClasses = new LinkedHashMap<>();\n\n        for (Map.Entry<String, InheritingClass> entry : memtableConfigurations.entrySet())\n        {\n            if (entry.getValue().inherits != null)\n            {\n                if (entry.getKey().equals(entry.getValue().inherits))\n                    throw new ConfigurationException(String.format(\"Configuration entry %s can not inherit itself.\", entry.getKey()));\n\n                if (memtableConfigurations.get(entry.getValue().inherits) == null && !entry.getValue().inherits.equals(DEFAULT_CONFIGURATION_KEY))\n                    throw new ConfigurationException(String.format(\"Configuration entry %s inherits non-existing entry %s.\",\n                                                                   entry.getKey(), entry.getValue().inherits));\n\n                inheritingClasses.put(entry.getKey(), entry.getValue());\n            }\n            else\n                configs.put(entry.getKey(), entry.getValue().resolve(configs));\n        }\n\n        for (Map.Entry<String, InheritingClass> inheritingEntry : inheritingClasses.entrySet())\n        {\n            String inherits = inheritingEntry.getValue().inherits;\n            while (inherits != null)\n            {\n                InheritingClass nextInheritance = inheritingClasses.get(inherits);\n                if (nextInheritance == null)\n                    inherits = null;\n                else\n                    inherits = nextInheritance.inherits;","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/schema/MemtableParams.java#L143-L179","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Fix the inherits value in cassandra.yaml to reference an actually defined entry name.","Define the missing base entry in memtable_configurations if it was intended.","Use the literal key 'default' if inheriting the default configuration.","Remove the inherits line if inheritance is not needed."],"exampleFix":"# before (cassandra.yaml)\nmemtable_configurations:\n  small:\n    inherits: smal   # typo\n# after\nmemtable_configurations:\n  small:\n    inherits: default","handlingStrategy":"validation","validationCode":"# pre-check inherits targets exist\npython3 -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']\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["After editing memtable_configurations, check that every inherits target is a sibling key or the literal 'default'.","When renaming/removing an entry, update all entries that inherit from it in the same change.","Share one reviewed base config across clusters instead of hand-merging."],"tags":["cassandra","configuration","yaml","memtable"],"backgroundTag":"missing-config-key","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}