{"record":{"id":"fbc393aeb2d514c5","repo":"apache/cassandra","slug":"row-entry-indexinfo-offset-width-should-match-ne","errorCode":null,"errorMessage":"Row entry indexInfo offset + width should match next block offset:","messagePattern":"Row entry indexInfo offset \\+ width should match next block offset:","errorType":"exception","errorClass":"CorruptSSTableException","httpStatus":null,"severity":"critical","filePath":"src/java/org/apache/cassandra/io/sstable/format/big/BigTableVerifier.java","lineNumber":150,"sourceCode":"                RowIndexEntry rowIndexEntry = it.rowIndexEntry();\n                if (outputHandler.isDebugEnabled()) outputHandler.debug(\"rowIndexEntry %s\", rowIndexEntry.toString());\n\n                long partitionBase = it.dataPosition();\n                int blockCount = rowIndexEntry.blockCount();\n                if (options.extendedVerification && blockCount > 0)\n                {\n                    long expectedNextOffset = 0;\n                    RowIndexEntry.IndexInfoRetriever indexInfoRetriever = rowIndexEntry.openWithIndex(it.indexFile());\n                    for (int blockIndex = 0; blockIndex < blockCount; blockIndex++)\n                    {\n                        IndexInfo indexInfo = indexInfoRetriever.columnsIndex(blockIndex);\n                        if (outputHandler.isDebugEnabled()) outputHandler.debug(\"indexInfo %s\", indexInfo.toString(sstable.metadata()));\n\n                        long dataFileOffset = partitionBase + indexInfo.offset;\n                        if (expectedNextOffset != 0)\n                        {\n                            if (expectedNextOffset != indexInfo.offset)\n                                throw new CorruptSSTableException(new IOException(\"Row entry indexInfo offset + width should match next block offset:\" + indexInfo.offset + \" expected: \" + expectedNextOffset), it.toString());\n                        }\n                        expectedNextOffset = indexInfo.offset + indexInfo.width;\n                        dataFile.seek(dataFileOffset);\n\n                        Unfiltered unfiltered = UnfilteredSerializer.serializer.deserialize(dataFile,\n                                                                                            sstable.header,\n                                                                                            deserializationHelper,\n                                                                                            BTreeRow.sortedBuilder());\n                        if (!Objects.equals(indexInfo.firstName, unfiltered.clustering()))\n                            throw new CorruptSSTableException(new IOException(\"Unfiltered clustering in index does not match data:{info=\" + indexInfo.toString(sstable.metadata()) + \", row:\" + unfiltered.clustering().toString(sstable.metadata()) + \"}\"), it.toString());\n\n                        if (comparator.compare(indexInfo.firstName, indexInfo.lastName) > 0)\n                            throw new CorruptSSTableException(new IOException(\"First name is > Last name:{info=\" + indexInfo.toString(sstable.metadata()) + \"}\"), it.toString());\n\n                    }\n                }\n            }\n            // The verifier checks that the partition key/position in the index and data match, here we waant to verify","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/io/sstable/format/big/BigTableVerifier.java#L132-L168","documentation":"Thrown during extended verification when the offset of an indexInfo block in the partition's row index does not equal the expected next offset derived from the previous block's offset+width. The serialized index blocks are non-contiguous or out of order, meaning the row index is corrupt.","triggerScenarios":"`nodetool verify` with extendedVerification on an SSTable whose RowIndexEntry indexInfo blocks have gaps or overlaps (corrupted or truncated index data inside the Summary/Data components).","commonSituations":"Crash or disk error while writing large partitions with many index blocks; bit rot on disk; corrupted SSTable copied between nodes.","solutions":["Scrub or delete the affected SSTable and repair the range from other replicas","Restore from snapshot/backup","Run `nodetool verify` across the node to identify all affected SSTables"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { verifier.verify(); }\ncatch (CorruptSSTableException e) { logger.error(\"Row index corrupt in {}\", e.getFilename()); scheduleScrub(descriptor); }","preventionTips":["Monitor and cap partition sizes to keep row indexes small","Use checksummed/storage with data integrity features","Verify SSTables after restores","Restore from snapshots instead of trusting questionable files"],"tags":["sstable","corruption","verifier","row-index"],"backgroundTag":"checksum-mismatch","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"}