{"record":{"id":"47af992376b459dc","repo":"apache/cassandra","slug":"s-is-reserved-for-internal-functionality","errorCode":null,"errorMessage":"%s is reserved for internal functionality","messagePattern":"(.+?) is reserved for internal functionality","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/marshal/TypeParser.java","lineNumber":471,"sourceCode":"        try\n        {\n            Field field = typeClass.getDeclaredField(\"instance\");\n            return (AbstractType<?>) field.get(null);\n        }\n        catch (NoSuchFieldException | IllegalAccessException e)\n        {\n            // Trying with empty parser\n            return getRawAbstractType(typeClass, EMPTY_PARSER);\n        }\n    }\n\n    private static AbstractType<?> getAbstractType(String compareWith, TypeParser parser) throws SyntaxException, ConfigurationException\n    {\n        Class<? extends AbstractType<?>> typeClass = getAbstractTypeClass(compareWith);\n        if (PseudoUtf8Type.class.isAssignableFrom(typeClass))\n        {\n            if (StorageService.instance.isDaemonSetupCompleted())\n                throw new ConfigurationException(typeClass.getName() + \" is reserved for internal functionality\");\n        }\n        try\n        {\n            Method method = typeClass.getDeclaredMethod(\"getInstance\", TypeParser.class);\n            return (AbstractType<?>) method.invoke(null, parser);\n        }\n        catch (NoSuchMethodException | IllegalAccessException e)\n        {\n            // Trying to see if we have an instance field and apply the default parameter to it\n            AbstractType<?> type = getRawAbstractType(typeClass);\n            return AbstractType.parseDefaultParameters(type, parser);\n        }\n        catch (InvocationTargetException e)\n        {\n            ConfigurationException ex = new ConfigurationException(\"Invalid definition for comparator \" + typeClass.getName() + \".\");\n            ex.initCause(e.getTargetException());\n            throw ex;\n        }","sourceCodeStart":453,"sourceCodeEnd":489,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/marshal/TypeParser.java#L453-L489","documentation":"TypeParser.getAbstractType rejects PseudoUtf8Type (an internal placeholder type) when it is requested after daemon setup has completed. This ConfigurationException exists because PseudoUtf8Type is reserved for internal functionality (vector search plumbing) and must never appear in user-visible schema.","triggerScenarios":"Parsing a type string naming PseudoUtf8Type (or a subclass) via TypeParser.parse/getAbstractType after StorageService daemon setup completed — e.g. user-supplied comparator \"PseudoUtf8Type\" in a CREATE TABLE or a hand-written type string referencing it.","commonSituations":"Users copying internal type names out of debug output or system logs into schema definitions, tooling that serializes internal comparators back to strings and feeds them into TypeParser, or attempting to reuse internal types for custom columns.","solutions":["Remove PseudoUtf8Type from the type string and use a supported comparator such as UTF8Type or AsciiType","If the name came from tooling output, treat it as internal-only and map it to the user-facing equivalent type","Upgrade/review any custom code that enumerates AbstractType classes by reflection and skips internal types","If seen during startup of a node with corrupted schema, repair the schema from a healthy node before full daemon setup completes"],"exampleFix":"// before\nCREATE TABLE t (k text PRIMARY KEY, v frozen<PseudoUtf8Type>);\n// after\nCREATE TABLE t (k text PRIMARY KEY, v text);","handlingStrategy":"validation","validationCode":"static void rejectInternalTypes(String typeString) {\n    if (typeString != null && typeString.contains(\"PseudoUtf8Type\"))\n        throw new IllegalArgumentException(\"PseudoUtf8Type is internal-only; use UTF8Type\");\n}","typeGuard":"static boolean isUserFacingType(String typeName) {\n    return typeName != null && !typeName.startsWith(\"PseudoUtf8\");\n}","tryCatchPattern":"try {\n    AbstractType<?> t = TypeParser.parse(typeString);\n} catch (ConfigurationException e) {\n    if (e.getMessage().contains(\"reserved for internal functionality\"))\n        throw new SchemaConfigurationException(\"Internal type used in schema; substitute a user-facing comparator\", e);\n    throw e;\n}","preventionTips":["Never copy type names from debug/system output into schema definitions","Treat types in internal packages (PseudoUtf8Type) as non-public API","Use UTF8Type/AsciiType for text comparators in user tables"],"tags":["cassandra","type-parser","configuration-exception","internal-type"],"backgroundTag":"invalid-enum-value","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"}