{"record":{"id":"5cb298cf1475f131","repo":"risingwavelabs/risingwave","slug":"invalid-block","errorCode":null,"errorMessage":"Invalid block","messagePattern":"Invalid block","errorType":"error_code","errorClass":"HummockError","httpStatus":null,"severity":"error","filePath":"src/storage/src/hummock/error.rs","lineNumber":31,"sourceCode":"// 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}\")]\n    WaitEpoch(String),\n    #[error(\"Next epoch error: {0}\")]","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/storage/src/hummock/error.rs#L13-L49","documentation":"Hummock encountered a block whose contents fail structural validation even though the magic/version may have been acceptable. It is thrown when a deserialized block cannot be interpreted as a valid data block. This guards the read path against malformed or corrupt storage data.","triggerScenarios":"Reading an SST block where the decoded layout fails block-level invariants (e.g. wrong structure after decode).","commonSituations":"Corrupted block payload in object storage; truncated downloads; reading data written by incompatible code paths; faulty custom object store implementations.","solutions":["Remove the affected SST from the object store and force recovery from replica/backup.","Verify the object store client configuration (endpoints, custom store) is not mangling data.","Check for concurrent/mismatched binary versions accessing the same store.","Escalate with the file/offset from logs to RisingWave maintainers if it reproduces."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Rust\nmatch hummock_read(...) {\n    Err(e) if e.to_string() == \"Invalid block\" => {\n        // treat as corruption: quarantine object, recover from replica\n    }\n    r => r?,\n}","preventionTips":["Use supported object store implementations only; avoid custom stores that can corrupt data.","Ensure stable network paths (retries with integrity checks) to the object store.","Keep all nodes on the same RisingWave version."],"tags":["storage","hummock","data-corruption"],"backgroundTag":"schema-validation-failed","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"}