{"record":{"id":"700a7be9e55a703a","repo":"risingwavelabs/risingwave","slug":"invalid-vector-item-0-1","errorCode":null,"errorMessage":"Invalid vector item: {0} {1}","messagePattern":"Invalid vector item: (.+?) (.+?)","errorType":"error_code","errorClass":"ValueEncodingError","httpStatus":null,"severity":"error","filePath":"src/common/src/util/value_encoding/error.rs","lineNumber":49,"sourceCode":"    #[error(\"Invalid jsonb encoding\")]\n    InvalidJsonbEncoding,\n    #[error(\"Invalid variant encoding\")]\n    InvalidVariantEncoding,\n    #[error(\"Invalid struct encoding: {0}\")]\n    InvalidStructEncoding(\n        #[source]\n        #[backtrace]\n        crate::array::ArrayError,\n    ),\n    #[error(\"Invalid list encoding: {0}\")]\n    InvalidListEncoding(\n        #[source]\n        #[backtrace]\n        crate::array::ArrayError,\n    ),\n    #[error(\"Invalid flag: {0:b}\")]\n    InvalidFlag(u8),\n    #[error(\"Invalid vector item: {0} {1}\")]\n    InvalidVectorItem(f32, String),\n}\n","sourceCodeStart":31,"sourceCodeEnd":52,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/common/src/util/value_encoding/error.rs#L31-L52","documentation":"ValueEncodingError::InvalidVectorItem is thrown by RisingWave's value-encoding layer when decoding a vector (list/array) item from its serialized byte representation fails: the decoded f32 item is invalid and the accompanying String carries the detailed reason. It typically surfaces when the on-disk or in-memory encoding of a float vector element does not match what the decoder expects (e.g. NaN/unexpected sentinel values or corrupted bytes).","triggerScenarios":"Decoding a serialized vector/list datum whose item decodes to an invalid f32 value; reading data written by an incompatible RisingWave version or corrupted storage; decoding vectors via value_encode/decode paths in src/common/src/util/value_encoding.","commonSituations":"Upgrading/downgrading RisingWave across a value-encoding format change; manually poking at hummock SST data or replication output; corrupted or truncated float vector payloads from a bad write path or hardware issue.","solutions":["Inspect the String field in the error message to identify the exact invalid item value and decoding step that failed.","Verify the data was written by the same RisingWave version; re-ingest or rebuild the affected table/materialized view if the encoding format changed.","Check storage integrity (Hummock SSTs, network buffers) and re-run consistency/recovery tooling for the affected objects.","If reproducible, capture the encoded bytes and file an issue with the RisingWave version and the failing datum."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before decoding a vector datum, validate each f32 item\nfn is_valid_vector_item(v: f32) -> bool {\n    !v.is_nan() && v.is_finite()\n}\n// check all items before passing to the value-encoding decoder\nassert!(vector_items.iter().all(|&v| is_valid_vector_item(v)));","typeGuard":"fn is_valid_vector_item(v: f32) -> bool {\n    v.is_finite()\n}","tryCatchPattern":null,"preventionTips":["Validate float vector payloads (finite, non-NaN) before writing them through value encoding.","Pin RisingWave versions across all nodes so encoding formats match.","Run consistency checks on Hummock storage after unclean shutdowns or hardware errors."],"tags":["rust","value-encoding","decoding","vector"],"backgroundTag":"unexpected-response-shape","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}