{"record":{"id":"600df0174893ef70","repo":"apache/cassandra","slug":"remote-configuration-of-auth-caches-is-disabled","errorCode":null,"errorMessage":"Remote configuration of auth caches is disabled","messagePattern":"Remote configuration of auth caches is disabled","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/auth/AuthCache.java","lineNumber":266,"sourceCode":"\n    /**\n     * Invalidate a key.\n     * @param k key to invalidate\n     */\n    public void invalidate(K k)\n    {\n        if (cache != null)\n            cache.invalidate(k);\n    }\n\n    /**\n     * Time in milliseconds that a value in the cache will expire after.\n     * @param validityPeriod in milliseconds\n     */\n    public synchronized void setValidity(int validityPeriod)\n    {\n        if (DISABLE_AUTH_CACHES_REMOTE_CONFIGURATION.getBoolean())\n            throw new UnsupportedOperationException(\"Remote configuration of auth caches is disabled\");\n\n        setValidityDelegate.accept(validityPeriod);\n        cache = initCache(cache);\n    }\n\n    public int getValidity()\n    {\n        return getValidityDelegate.getAsInt();\n    }\n\n    /**\n     * Time in milliseconds after which an entry in the cache should be refreshed (it's load function called again)\n     * @param updateInterval in milliseconds\n     */\n    public synchronized void setUpdateInterval(int updateInterval)\n    {\n        if (DISABLE_AUTH_CACHES_REMOTE_CONFIGURATION.getBoolean())\n            throw new UnsupportedOperationException(\"Remote configuration of auth caches is disabled\");","sourceCodeStart":248,"sourceCodeEnd":284,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/auth/AuthCache.java#L248-L284","documentation":"Thrown by CreateViewStatement.apply when a regular table (not a view) already exists under the view's target name in the keyspace. View and table names share one namespace per keyspace, so creating an MV that would collide with an existing table is rejected to avoid ambiguity.","triggerScenarios":"Executing 'CREATE MATERIALIZED VIEW ks.name AS ...' where keyspace.hasTable(viewName) is true and no IF NOT EXISTS semantics resolve the conflict.","commonSituations":"Reusing a legacy table's name for a new view; re-running migration scripts where a table with that name was already created; collisions between view names and pre-existing denormalized tables.","solutions":["Choose a different name for the materialized view.","Drop or rename the existing table if it is truly obsolete (after backing up data).","Add IF NOT EXISTS only if the existing object is acceptable to keep.","Check keyspace contents with 'DESCRIBE TABLES' to see the conflicting object."],"exampleFix":"// before\nCREATE MATERIALIZED VIEW ks.summary AS SELECT ...;\n// after\nCREATE MATERIALIZED VIEW ks.summary_mv AS SELECT ...;","handlingStrategy":"validation","validationCode":"boolean nameTaken = session.execute(\n    \"SELECT table_name FROM system_schema.tables WHERE keyspace_name = ? AND table_name = ?\", ks, viewName).one() != null;\nif (nameTaken) chooseDifferentViewName();","typeGuard":null,"tryCatchPattern":"try {\n    session.execute(createMvStmt);\n} catch (InvalidQueryException e) {\n    if (e.getMessage().contains(\"a table with the same name already exists\")) { /* pick new name or drop table */ }\n    else throw e;\n}","preventionTips":["Use a naming convention distinguishing views from tables (e.g. *_mv suffix).","Reserve view names in schema documentation to avoid table-name reuse.","Check keyspace contents before deploying new objects."],"tags":["cassandra","cql","materialized-view","ddl","name-conflict"],"backgroundTag":"file-already-exists","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"}