{"record":{"id":"09406de0ecaa0fbf","repo":"apache/cassandra","slug":"table-id-no-longer-exists-it-may-have","errorCode":null,"errorMessage":"Table {}.{} (id: {}) no longer exists. It may have been dropped.","messagePattern":"Table (.+?)\\.(.+?) \\(id: (.+?)\\) no longer exists\\. It may have been dropped\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/java/org/apache/cassandra/db/virtual/AccordDebugKeyspace.java","lineNumber":918,"sourceCode":"                                             .collect(Collectors.toList());\n\n            ConsensusMigrationState snapshot = ClusterMetadata.current().consensusMigrationState;\n            Collection<TableMigrationState> tableStates = snapshot.tableStatesFor(tableIDs);\n\n            return data(tableStates);\n        }\n\n        private SimpleDataSet data(Collection<TableMigrationState> tableStates)\n        {\n            SimpleDataSet result = new SimpleDataSet(metadata());\n\n            for (TableMigrationState state : tableStates)\n            {\n                TableMetadata table = Schema.instance.getTableMetadata(state.tableId);\n\n                if (table == null)\n                {\n                    logger.warn(\"Table {}.{} (id: {}) no longer exists. It may have been dropped.\",\n                                state.keyspaceName, state.tableName, state.tableId);\n                    continue;\n                }\n\n                result.row(state.keyspaceName, state.tableName);\n                result.column(\"table_id\", state.tableId.asUUID());\n                result.column(\"target_protocol\", state.targetProtocol.toString());\n                result.column(\"transactional_mode\", table.params.transactionalMode.toString());\n                result.column(\"transactional_migration_from\", table.params.transactionalMode.toString());\n\n                List<String> primitiveMigratedRanges = state.migratedRanges.stream().map(Objects::toString).collect(toImmutableList());\n                result.column(\"migrated_ranges\", primitiveMigratedRanges);\n\n                List<String> primitiveRepairPendingRanges = state.repairPendingRanges.stream().map(Objects::toString).collect(toImmutableList());\n                result.column(\"repair_pending_ranges\", primitiveRepairPendingRanges);\n        \n                Map<Long, List<String>> primitiveRangesByEpoch = new LinkedHashMap<>();\n                for (Map.Entry<org.apache.cassandra.tcm.Epoch, NormalizedRanges<Token>> entry : state.migratingRangesByEpoch.entrySet())","sourceCodeStart":900,"sourceCodeEnd":936,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/virtual/AccordDebugKeyspace.java#L900-L936","documentation":"In AccordDebugKeyspace, when rendering a virtual-table row for a TableMigrationState, the table's id can no longer be resolved from Schema. The code logs a warning 'Table {ks}.{table} (id: {}) no longer exists. It may have been dropped.' and skips the row instead of failing. It reflects a race between schema drops and migration-state bookkeeping.","triggerScenarios":"SELECT from the Accord debug virtual tables while a table that was being migrated to Accord (or tracked in tableStates) is dropped concurrently; listing migration states after a DROP TABLE removed the schema entry.","commonSituations":"Debugging Accord migrations on a schema where tables were dropped; racing DROP TABLE with virtual-table queries; stale TableMigrationState entries after schema churn.","solutions":["Verify the table actually exists: run DESC TABLE or query system_schema.tables for the keyspace/table named in the warning.","Re-run the virtual table query after the migration state is cleaned up; the stale entry is skipped harmlessly.","If the table should exist, restore it from schema or recreate it; ensure the drop was intentional."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// verify table existence before relying on Accord debug output\nString ks = state.keyspaceName, tbl = state.tableName;\nboolean exists = session.execute(\"SELECT keyspace_name FROM system_schema.tables WHERE keyspace_name=? AND table_name=?\", ks, tbl).iterator().hasNext();","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Avoid concurrent DROP TABLE while inspecting Accord migration virtual tables.","Re-query after schema changes settle.","Confirm table existence in system_schema when a row is missing."],"tags":["virtual-table","schema","dropped-table","accord"],"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"}