{"record":{"id":"5a39fcae64d7b23f","repo":"risingwavelabs/risingwave","slug":"pb-decode-error-0","errorCode":null,"errorMessage":"Pb decode error: {0}","messagePattern":"Pb decode error: (.+?)","errorType":"error_code","errorClass":"ArrayError","httpStatus":null,"severity":"error","filePath":"src/common/src/array/error.rs","lineNumber":26,"sourceCode":"//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// 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 std::convert::Infallible;\n\npub use anyhow::anyhow;\nuse risingwave_pb::PbFieldNotFound;\nuse thiserror::Error;\nuse thiserror_ext::Construct;\n\nuse crate::error::BoxedError;\n\n#[derive(Error, Debug, Construct)]\npub enum ArrayError {\n    #[error(\"Pb decode error: {0}\")]\n    PbDecode(#[from] prost::DecodeError),\n\n    #[error(\"I/O error: {0}\")]\n    Io(#[from] std::io::Error),\n\n    #[error(transparent)]\n    Internal(\n        #[from]\n        #[backtrace]\n        anyhow::Error,\n    ),\n\n    #[error(\"Convert from arrow error: {0}\")]\n    FromArrow(\n        #[source]\n        #[backtrace]\n        BoxedError,\n    ),","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/common/src/array/error.rs#L8-L44","documentation":"ArrayError::PbDecode wraps a prost::DecodeError that occurred while decoding a protobuf-encoded array. It is raised when binary data expected to deserialize into an array's protobuf representation is malformed or a schema version mismatch makes the bytes undecodable.","triggerScenarios":"Any code path that converts a prost message into an array (e.g. prost value conversion via TryFrom with #[from] prost::DecodeError) receiving corrupt/truncated bytes or an incompatible proto definition.","commonSituations":"Corrupted data in a checkpoint/snapshot; reading data written by a newer RW version with changed proto schema; feeding wrong byte buffers into array deserialization.","solutions":["Identify the source of the bytes (usually Hummock storage or network serialization) and check for corruption","Ensure all cluster nodes run the same RisingWave version so proto schemas match","Replay/recover from a clean checkpoint if data corruption is confirmed"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Sanity-check the payload before decode\nif bytes.is_empty() || bytes.len() > MAX_ARRAY_BYTES { return Err(\"invalid array payload\".into()); }","typeGuard":null,"tryCatchPattern":"match result {\n    Err(ArrayError::PbDecode(e)) => {\n        log::error!(\"protobuf array decode failed: {e}; check version/corruption\");\n        // recover from checkpoint or skip bad batch\n    }\n    other => other,\n}","preventionTips":["Keep all cluster nodes on the same RisingWave version","Checksum-verify serialized payloads in transit and storage","Recover from clean checkpoints when corruption is detected"],"tags":["protobuf","decoding","serialization"],"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"}