{"record":{"id":"85fa4c817c0d0a40","repo":"apache/cassandra","slug":"partition-starting-at-position-d-is-unreadable-s-85fa4c","errorCode":null,"errorMessage":"Partition starting at position %d is unreadable; skipping to next","messagePattern":"Partition starting at position (.+?) is unreadable; skipping to next","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/io/sstable/format/bti/BtiTableScrubber.java","lineNumber":231,"sourceCode":"                    catch (Throwable th2)\n                    {\n                        throwIfFatal(th2);\n                        throwIfCannotContinue(key, th2);\n\n                        outputHandler.warn(th2, \"Retry failed too. Skipping to next partition (retry's stacktrace follows)\");\n                        badPartitions++;\n                        if (!seekToNextPartition())\n                            break;\n                    }\n                }\n                else\n                {\n                    throwIfCannotContinue(key, th);\n\n                    badPartitions++;\n                    if (indexIterator != null)\n                    {\n                        outputHandler.warn(\"Partition starting at position %d is unreadable; skipping to next\", dataStart);\n                        if (!seekToNextPartition())\n                            break;\n                    }\n                    else\n                    {\n                        outputHandler.warn(\"Unrecoverable error while scrubbing %s.\" +\n                                           \"Scrubbing cannot continue. The sstable will be marked for deletion. \" +\n                                           \"You can attempt manual recovery from the pre-scrub snapshot. \" +\n                                           \"You can also run nodetool repair to transfer the data from a healthy replica, if any.\",\n                                           sstable);\n                        // There's no way to resync and continue. Give up.\n                        break;\n                    }\n                }\n            }\n        }\n    }\n","sourceCodeStart":213,"sourceCodeEnd":249,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/io/sstable/format/bti/BtiTableScrubber.java#L213-L249","documentation":"When a partition read fails during BTI scrub and the index iterator is available, the scrubber counts the partition as bad, warns with the partition's data file start position, and seeks to the next indexed partition to continue scrubbing. If seeking fails or no index is available, scrubbing cannot reliably continue and the scrub aborts with an unrecoverable-error warning.","triggerScenarios":"`nodetool scrub` hits an unreadable partition at dataStart while indexIterator != null — corrupt or truncated partition data at a known offset, with a usable index to skip past it.","commonSituations":"Isolated corrupt regions in Data.db from disk faults; crash-written partial partitions; sstables manually copied from a live node (not flushed/snapshotted).","solutions":["Let scrub complete; the bad partition is skipped and reported via badPartitions.","Run `nodetool repair` to restore the skipped partition's data from replicas.","Check hardware/filesystem health for the volume holding Data.db.","Re-run scrub plus `nodetool verify` afterwards to confirm the remaining sstables are clean."],"exampleFix":"// after scrub skips partitions:\n$ nodetool scrub <keyspace> <table>\n$ nodetool repair <keyspace> <table>\n$ nodetool verify <keyspace> <table>","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Schedule regular scrub + repair windows to bound data loss from silent corruption.","Monitor scrub logs and alert on any 'unreadable' warnings.","Use snapshots for backups and validate them with sstablemetadata.","Track badPartitions counts across scrubs; growth indicates a hardware problem."],"tags":["cassandra","scrub","sstable","skip-partition"],"backgroundTag":"checksum-mismatch","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"}