{"record":{"id":"4633eb642fe24cb9","repo":"apache/cassandra","slug":"unknown-table-s-s-4633eb","errorCode":null,"errorMessage":"Unknown table %s.%s","messagePattern":"Unknown table (.+?)\\.(.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/service/consensus/migration/ConsensusTableMigration.java","lineNumber":357,"sourceCode":"\n\n    private static List<TableId> keyspacesAndTablesToTableIds(@Nonnull ClusterMetadata cm, @Nonnull List<String> keyspaceNames, @Nonnull Optional<List<String>> maybeTables)\n    {\n        return keyspacesAndTablesToTableIds(cm, keyspaceNames, maybeTables, Optional.empty());\n    }\n\n    private static List<TableId> keyspacesAndTablesToTableIds(@Nonnull ClusterMetadata cm, @Nonnull List<String> keyspaceNames, @Nonnull Optional<List<String>> maybeTables, @Nonnull Optional<Predicate<TableId>> includeTable)\n    {\n        List<TableId> tableIds = new ArrayList<>();\n        for (String keyspaceName : keyspaceNames)\n        {\n            Optional<Collection<TableId>> maybeTableIds = maybeTables.map(tableNames ->\n                    tableNames\n                            .stream()\n                            .map(tableName -> {\n                                TableMetadata tm = cm.schema.getTableMetadata(keyspaceName, tableName);\n                                if (tm == null)\n                                    throw new IllegalArgumentException(format(\"Unknown table %s.%s\", keyspaceName, tableName));\n                                return tm.id;\n                            })\n                            .collect(toImmutableList()));\n            tableIds.addAll(\n                    maybeTableIds.orElseGet(() ->\n                            cm.schema.getKeyspace(keyspaceName).getColumnFamilyStores()\n                                    .stream()\n                                    .map(ColumnFamilyStore::getTableId)\n                                    .filter(includeTable.orElse(Predicates.alwaysTrue())) // Filter out non-migrating so they don't generate an error\n                                    .collect(toImmutableList())));\n        }\n        return tableIds;\n    }\n\n    @Nonnull\n    private static RepairOption getRepairOption(Collection<TableMigrationState> tables, List<Range<Token>> intersectingRanges, boolean repairData, boolean repairPaxos, boolean repairAccord)\n    {\n        boolean primaryRange = false;","sourceCodeStart":339,"sourceCodeEnd":375,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/consensus/migration/ConsensusTableMigration.java#L339-L375","documentation":"When translating a list of keyspaces/tables into TableIds for a consensus-migration operation, each requested table name is resolved against the schema in ClusterMetadata. If a named table does not exist in the given keyspace, Cassandra throws this IllegalArgumentException.","triggerScenarios":"Calling tableIdsToMigrate/migration APIs (or the operator command that wraps them) with an explicit table list containing a table name that does not exist in the specified keyspace — e.g. typo in table name, table dropped, or wrong keyspace casing.","commonSituations":"Typo'd or case-sensitive table name in the migration command; table dropped between planning and execution; copying a command between clusters/environments where the table set differs; keyspace named without quoting a case-sensitive identifier.","solutions":["Verify the table exists: SELECT table_name FROM system_schema.tables WHERE keyspace_name = '<ks>'; and fix the name/casing in the command","Quote case-sensitive identifiers correctly in CQL","Re-run the migration with the corrected keyspace/table list","If the table was dropped intentionally, remove it from the migration table list"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"List<String> existing = session.execute(\"SELECT table_name FROM system_schema.tables WHERE keyspace_name=?\", ks)\n    .all().stream().map(r -> r.getString(\"table_name\")).collect(toList());\nif (!existing.containsAll(tableNames)) throw new IllegalArgumentException(\"unknown table(s) requested\");","typeGuard":null,"tryCatchPattern":"try { migrate(ks, tables); } catch (IllegalArgumentException e) { /* correct table names/casing and retry */ }","preventionTips":["Validate keyspace/table names against system_schema before migration commands","Watch identifier case sensitivity and quoting","Remove dropped tables from migration lists"],"tags":["unknown-table","schema","invalid-argument","migration"],"backgroundTag":"entity-not-found","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}