{"record":{"id":"51af38bd88fa2bab","repo":"risingwavelabs/risingwave","slug":"serialize-deserialize-error-0-51af38","errorCode":null,"errorMessage":"Serialize/deserialize error: {0}","messagePattern":"Serialize/deserialize error: (.+?)","errorType":"error_code","errorClass":"StorageError","httpStatus":null,"severity":"error","filePath":"src/storage/src/error.rs","lineNumber":38,"sourceCode":"\n#[derive(Error, thiserror_ext::ReportDebug, thiserror_ext::Box)]\n#[thiserror_ext(newtype(name = StorageError, backtrace))]\npub enum ErrorKind {\n    #[error(\"Hummock error: {0}\")]\n    Hummock(\n        #[backtrace]\n        #[from]\n        HummockError,\n    ),\n\n    #[error(\"Deserialize row error: {0}\")]\n    DeserializeRow(\n        #[from]\n        #[backtrace]\n        ValueEncodingError,\n    ),\n\n    #[error(\"Serialize/deserialize error: {0}\")]\n    SerdeError(\n        #[from]\n        #[backtrace]\n        memcomparable::Error,\n    ),\n\n    #[error(\"Sled error: {0}\")]\n    Sled(\n        #[backtrace]\n        #[from]\n        sled::Error,\n    ),\n\n    #[error(\"MemTable error: {0}\")]\n    MemTable(\n        #[backtrace]\n        #[from]\n        Box<MemTableError>,","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/storage/src/error.rs#L20-L56","documentation":"A StorageError variant wrapping memcomparable::Error. It occurs during serialization or deserialization of rows in memcomparable format, used for encoding keys/rows to store order-preservingly in the state store.","triggerScenarios":"Serializing a row whose datum types mismatch the schema (e.g. wrong number of columns, incompatible datum type), or deserializing a memcomparable buffer written with a different schema/version.","commonSituations":"Schema mismatch between frontend plan and storage encoder, buggy ad-hoc tools reading raw state-store keys, data written by an incompatible RisingWave version.","solutions":["Verify the schema used to serialize matches the schema used to deserialize (column count and types)","Re-run the operation against data written by the same RisingWave version; migrate data if versions differ","Inspect the inner memcomparable error message to pinpoint which datum failed"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match write_row(&row).await {\n    Err(e) if matches!(e.kind(), StorageErrorKind::SerdeError(_)) => {\n        // schema mismatch: verify datum types/column count before retrying\n    }\n    other => other,\n}","preventionTips":["Validate row schema against table schema before encoding","Avoid reading raw state-store data with hand-rolled memcomparable code","Keep serialization and deserialization schema versions in lockstep"],"tags":["rust","storage","serialization","memcomparable"],"backgroundTag":"json-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"}