{"record":{"id":"9c041b1eefd880da","repo":"risingwavelabs/risingwave","slug":"decoding-error-0","errorCode":null,"errorMessage":"Decoding error: {0}","messagePattern":"Decoding error: (.+?)","errorType":"error_code","errorClass":"BackupError","httpStatus":null,"severity":"error","filePath":"src/storage/backup/src/error.rs","lineNumber":46,"sourceCode":"    #[error(\"MetaStorage error: {0}\")]\n    MetaStorage(\n        #[backtrace]\n        #[source]\n        BoxedError,\n    ),\n    #[error(\"StateStorage error: {0}\")]\n    StateStorage(\n        #[backtrace]\n        #[source]\n        BoxedError,\n    ),\n    #[error(\"Encoding error: {0}\")]\n    Encoding(\n        #[backtrace]\n        #[source]\n        BoxedError,\n    ),\n    #[error(\"Decoding error: {0}\")]\n    Decoding(\n        #[backtrace]\n        #[source]\n        BoxedError,\n    ),\n    #[error(\"Checksum mismatch: expected {expected}, found: {found}\")]\n    ChecksumMismatch { expected: u64, found: u64 },\n    #[error(\"Meta storage is not empty before being restored\")]\n    NonemptyMetaStorage,\n    #[error(transparent)]\n    Other(\n        #[from]\n        #[backtrace]\n        anyhow::Error,\n    ),\n}\n\nimpl From<std::io::Error> for BackupError {","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/storage/backup/src/error.rs#L28-L64","documentation":"`BackupError::Decoding` wraps an underlying error raised when deserializing/decoding backup data read from backup storage. The original decoder error is boxed as source with backtrace, indicating the bytes on storage could not be parsed into the expected structure.","triggerScenarios":"Restore/recovery paths that read a backup manifest or snapshot blob from backup storage and fail to decode it (prost decode failure, unexpected format, truncated file).","commonSituations":"Restoring a backup produced by an incompatible RisingWave version; partially uploaded/corrupted backup files; manual edits or truncated downloads of backup artifacts.","solutions":["Check the wrapped source error to identify the malformed artifact.","Verify the backup was created by a compatible version and was fully uploaded (checksum/size).","Re-create the backup from a healthy cluster and retry the restore with the new artifact."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate backup artifact before attempting decode\nfn artifact_complete(meta: &ObjectMeta) -> bool {\n    meta.content_length == meta.expected_size\n}","typeGuard":null,"tryCatchPattern":"match load_backup_manifest(bytes).await {\n    Err(e @ BackupError::Decoding(_)) => {\n        tracing::error!(source = ?e.source(), \"backup artifact undecodable\");\n        // verify artifact version/size, obtain fresh backup\n    }\n    other => other?,\n}","preventionTips":["Verify backup artifact size/checksum after download, before restore.","Restore only from backups created by a compatible RisingWave version.","Never hand-edit backup files; keep artifacts immutable."],"tags":["backup","decoding","serialization","rust"],"backgroundTag":"protobuf-unmarshal-failed","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}