{"record":{"id":"b633ddeefe7389f6","repo":"risingwavelabs/risingwave","slug":"checksum-mismatch-expected-expected-found-fo-b633dd","errorCode":null,"errorMessage":"Checksum mismatch: expected {expected}, found: {found}","messagePattern":"Checksum mismatch: expected (.+?), found: (.+?)","errorType":"error_code","errorClass":"HummockError","httpStatus":null,"severity":"critical","filePath":"src/storage/src/hummock/error.rs","lineNumber":29,"sourceCode":"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nuse risingwave_object_store::object::ObjectError;\nuse risingwave_pb::id::TableId;\nuse thiserror::Error;\nuse thiserror_ext::AsReport;\nuse tokio::sync::oneshot::error::RecvError;\n\n// TODO(error-handling): should prefer use error types than strings.\n#[derive(Error, thiserror_ext::ReportDebug, thiserror_ext::Arc)]\n#[thiserror_ext(newtype(name = HummockError, backtrace))]\npub enum HummockErrorInner {\n    #[error(\"Magic number mismatch: expected {expected}, found: {found}\")]\n    MagicMismatch { expected: u32, found: u32 },\n    #[error(\"Invalid format version: {0}\")]\n    InvalidFormatVersion(u32),\n    #[error(\"Checksum mismatch: expected {expected}, found: {found}\")]\n    ChecksumMismatch { expected: u64, found: u64 },\n    #[error(\"Invalid block\")]\n    InvalidBlock,\n    #[error(\"Encode error: {0}\")]\n    EncodeError(String),\n    #[error(\"Decode error: {0}\")]\n    DecodeError(String),\n    #[error(\"ObjectStore failed with IO error: {0}\")]\n    ObjectIoError(\n        #[from]\n        #[backtrace]\n        ObjectError,\n    ),\n    #[error(\"Meta error: {0}\")]\n    MetaError(String),\n    #[error(\"SharedBuffer error: {0}\")]\n    SharedBufferError(String),\n    #[error(\"Wait epoch error: {0}\")]","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/storage/src/hummock/error.rs#L11-L47","documentation":"Hummock verified a data block's checksum after reading it from the object store and the computed value did not match the stored expected value. This indicates the data bytes were corrupted in transit or at rest. The library throws it to prevent serving corrupt data.","triggerScenarios":"Reading a block from an SST (via BlockHeader/checksum validation) where computed checksum != stored expected: expected u64 vs found u64.","commonSituations":"Faulty disk or S3 object corruption; network bit-flips without TLS/verified uploads; a truncated or partially written SST; manual tampering with object store contents.","solutions":["Delete/redownload the affected SST and let Hummock re-fetch from the object store.","Verify object integrity in the object store (re-upload from replica or restore from backup) for the listed file.","Check hardware health (disk SMART, memory) and network path if corruption recurs.","Full recovery: restore the cluster's data from backup/snapshot and rebuild the affected tables."],"exampleFix":"// before: keeping suspect object\naws s3 cp s3://bucket/hummock_xx ./corrupt --no-verify\n// after\naws s3api head-object s3://bucket/hummock_xx  # compare checksum, then delete object and recreate table from backup","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Rust\nmatch hummock_read(...) {\n    Err(e) if e.to_string().starts_with(\"Checksum mismatch\") => {\n        // alert on corruption; do not blindly retry same object — delete & recover\n    }\n    r => r?,\n}","preventionTips":["Enable checksum verification on uploads to the object store.","Monitor disk/memory health on nodes touching storage data.","Keep backups/snapshots of hummock data for recovery.","Avoid manual modification of objects in the hummock bucket."],"tags":["storage","hummock","data-corruption","checksum"],"backgroundTag":"checksum-mismatch","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}