risingwavelabs/risingwave · error · ValueEncodingError

Invalid vector item: {0} {1}

Error message

Invalid vector item: {0} {1}

What it means

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).

Source

Thrown at src/common/src/util/value_encoding/error.rs:49

    #[error("Invalid jsonb encoding")]
    InvalidJsonbEncoding,
    #[error("Invalid variant encoding")]
    InvalidVariantEncoding,
    #[error("Invalid struct encoding: {0}")]
    InvalidStructEncoding(
        #[source]
        #[backtrace]
        crate::array::ArrayError,
    ),
    #[error("Invalid list encoding: {0}")]
    InvalidListEncoding(
        #[source]
        #[backtrace]
        crate::array::ArrayError,
    ),
    #[error("Invalid flag: {0:b}")]
    InvalidFlag(u8),
    #[error("Invalid vector item: {0} {1}")]
    InvalidVectorItem(f32, String),
}

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Inspect the String field in the error message to identify the exact invalid item value and decoding step that failed.
  2. Verify the data was written by the same RisingWave version; re-ingest or rebuild the affected table/materialized view if the encoding format changed.
  3. Check storage integrity (Hummock SSTs, network buffers) and re-run consistency/recovery tooling for the affected objects.
  4. If reproducible, capture the encoded bytes and file an issue with the RisingWave version and the failing datum.
Defensive patterns

Strategy: validation

Validate before calling

// Before decoding a vector datum, validate each f32 item
fn is_valid_vector_item(v: f32) -> bool {
    !v.is_nan() && v.is_finite()
}
// check all items before passing to the value-encoding decoder
assert!(vector_items.iter().all(|&v| is_valid_vector_item(v)));

Type guard

fn is_valid_vector_item(v: f32) -> bool {
    v.is_finite()
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/700a7be9e55a703a. Report an issue: GitHub.