{"record":{"id":"5e9d93a86ba60dd2","repo":"apache/cassandra","slug":"got-denylist-mutation-for-unknown-ks-cf-sk","errorCode":null,"errorMessage":"Got denylist mutation for unknown ks/cf: {}/{}. Skipping refresh.","messagePattern":"Got denylist mutation for unknown ks/cf: (.+?)/(.+?)\\. Skipping refresh\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/schema/PartitionDenylist.java","lineNumber":530,"sourceCode":"            }\n            return results;\n        }\n        catch (final RequestExecutionException e)\n        {\n            logger.error(\"Error reading full partition denylist from \"\n                         + SchemaConstants.DISTRIBUTED_KEYSPACE_NAME + \".\" + SystemDistributedKeyspace.PARTITION_DENYLIST_TABLE +\n                         \". Partition Denylisting will be compromised. Exception: \" + e);\n            return Collections.emptyMap();\n        }\n    }\n\n    private boolean refreshTableDenylist(String keyspace, String table)\n    {\n        checkDenylistNodeAvailability();\n        final TableId tid = getTableId(keyspace, table);\n        if (tid == null)\n        {\n            logger.warn(\"Got denylist mutation for unknown ks/cf: {}/{}. Skipping refresh.\", keyspace, table);\n            return false;\n        }\n\n        DenylistEntry newEntry = getDenylistForTableFromCQL(tid);\n        denylist.put(tid, newEntry);\n        return true;\n    }\n\n    private TableId getTableId(final String keyspace, final String table)\n    {\n        TableMetadata tmd = Schema.instance.getTableMetadata(keyspace, table);\n        return tmd == null ? null : tmd.id;\n    }\n}\n","sourceCodeStart":512,"sourceCodeEnd":545,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/schema/PartitionDenylist.java#L512-L545","documentation":"PartitionDenylist.refreshTableDenylist logs this warning when a denylist mutation (add/remove key) targets a keyspace/table that cannot be resolved to a TableId. The refresh is skipped and the method returns false; the denylist cache is left unchanged.","triggerScenarios":"addKeyToDenylist or removeKeyFromDenylist invoked for a ks/cf name that no longer exists (dropped table/keyspace) or never existed when the denylist mutation is processed.","commonSituations":"Stale denylist entries referencing dropped tables after schema changes; race between DROP TABLE and a denylist write; typo in keyspace/table name in denylist JMX/API calls.","solutions":["Verify the keyspace/table names used in the denylist mutation exist (system_schema.tables)","Remove stale denylist entries referencing dropped tables from system_distributed.partition_denylist","Re-apply the denylist mutation after (re)creating the table, or rely on next full reload","Fix typos in the denylist update call (JMX mbean / API parameters)"],"exampleFix":"// before\nDenylist.addKeyToDenylist(\"ks\",\"old_table\", pk); // table dropped\n// after\nif (Schema.instance.isValidTable(\"ks\",\"old_table\")) Denylist.addKeyToDenylist(\"ks\",\"old_table\", pk);","handlingStrategy":"validation","validationCode":"// confirm table exists before denylist mutation\nif (Schema.instance.getTableMetadataNullable(keyspace, table) == null)\n    throw new IllegalArgumentException(\"Unknown ks/cf for denylist mutation: \" + keyspace + \"/\" + table);","typeGuard":"boolean tableExists(String ks, String cf) {\n    return ClusterMetadata.current().schema.getKeyspaceMetadata(ks) != null\n        && ClusterMetadata.current().schema.getKeyspaceMetadata(ks).getTableOrViewNullable(cf) != null;\n}","tryCatchPattern":"if (!refreshTableDenylist(ks, table)) {\n    logger.warn(\"Denylist refresh skipped for missing table {}/{}\", ks, table);\n}","preventionTips":["Purge denylist entries when tables/keyspaces are dropped","Validate ks/cf names before denylist JMX/API calls","Re-apply denylist entries after table recreation"],"tags":["denylist","schema","stale-metadata"],"backgroundTag":"resource-not-found","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"}