{"record":{"id":"aa7b966ae0676570","repo":"apache/cassandra","slug":"failed-to-read-a-hint-for-table-with-id","errorCode":null,"errorMessage":"Failed to read a hint for {}: {} - table with id {} is unknown in file {}","messagePattern":"Failed to read a hint for (.+?): (.+?) - table with id (.+?) is unknown in file (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/hints/HintsReader.java","lineNumber":247,"sourceCode":"\n            return readHint(size);\n        }\n\n        private Hint readHint(int size) throws IOException\n        {\n            applyThrottleRateLimit(size);\n            input.limit(size);\n\n            Hint hint;\n            try\n            {\n                hint = Hint.serializer.deserializeIfLive(input, now, size, descriptor.messagingVersion());\n                input.checkLimit(0);\n            }\n            catch (UnknownTableException | CoordinatorBehindException e)\n            {\n                TableId id = ((UnknownTableException) (e instanceof CoordinatorBehindException ? e.getCause() : e)).id;\n                logger.warn(\"Failed to read a hint for {}: {} - table with id {} is unknown in file {}\",\n                            StorageService.instance.getEndpointForHostId(descriptor.hostId),\n                            descriptor.hostId,\n                            id,\n                            descriptor.fileName());\n                input.skipBytes(Ints.checkedCast(size - input.bytesPastLimit()));\n\n                hint = null; // set the return value to null and let following code to update/check the CRC\n            }\n\n            if (input.checkCrc())\n                return hint;\n\n            // log a warning and skip the corrupted entry\n            logger.warn(\"Failed to read a hint for {}: {} - digest mismatch for hint at position {} in file {}\",\n                        StorageService.instance.getEndpointForHostId(descriptor.hostId),\n                        descriptor.hostId,\n                        input.getPosition() - size - 4,\n                        descriptor.fileName());","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/hints/HintsReader.java#L229-L265","documentation":"While deserializing a hint, the target table's id is unknown to this node (UnknownTableException, possibly wrapped as CoordinatorBehindException), meaning the local schema has no table with that id — usually because the table was dropped, or this node's schema is behind/ahead of the sender's. The reader logs this warning naming the endpoint, hostId, tableId and file, then skips the hint's bytes and continues with the next hint.","triggerScenarios":"readHint during replay encounters deserializeIfLive throwing UnknownTableException (or CoordinatorBehindException wrapping one) because descriptor's table no longer exists in local schema; hints written for a DROPped table being replayed.","commonSituations":"Table dropped while hints for it were queued; schema disagreement where the replaying node hasn't learned about a new table yet; restoring a node from an old snapshot with stale hints files.","solutions":["If the table was intentionally dropped, ignore the warning — hints are correctly skipped","Otherwise run schema agreement (nodetool describecluster) and repair schema to sync the missing table","Clear stale hints for dropped tables (nodetool truncatehints) to silence repeated warnings","Check that the hint-sending node is not behind on schema versions"],"exampleFix":"// before: hints for a dropped table spamming logs\nDROP TABLE was done while hints pending\n// after: clear the stale hints\nnodetool truncatehints","handlingStrategy":"validation","validationCode":"// before replay, check the hint's table still exists locally\nTableId id = ...; // from descriptor/context\nif (Schema.instance.getTableMetadata(id) == null) {\n  logger.warn(\"Skipping hints for unknown table {}\", id);\n  return;\n}","typeGuard":null,"tryCatchPattern":"try {\n  hint = Hint.serializer.deserializeIfLive(input, now, size, descriptor.messagingVersion());\n} catch (UnknownTableException e) {\n  logger.warn(\"Skipping hint for unknown table {}\", e.id);\n  input.skipBytes(Ints.checkedCast(size - input.bytesPastLimit()));\n  return null; // continue with next hint\n}","preventionTips":["Establish schema agreement before/after DROP TABLE operations","Run truncatehints after dropping tables to clear queued hints","Keep schema migrations coordinated cluster-wide","Run repairs to backfill writes lost to skipped hints"],"tags":["hints","schema","unknown-table","replay"],"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"}