risingwavelabs/risingwave · error · HummockError
Encode error: {0}
Error message
Encode error: {0} What it means
A value failed to serialize (encode) before being written by Hummock, and the underlying encoder returned a string description of the problem. Hummock wraps this as an EncodeError so storage callers get a uniform error type. The String payload carries the encoder's message.
Source
Thrown at src/storage/src/hummock/error.rs:33
use risingwave_object_store::object::ObjectError;
use risingwave_pb::id::TableId;
use thiserror::Error;
use thiserror_ext::AsReport;
use tokio::sync::oneshot::error::RecvError;
// TODO(error-handling): should prefer use error types than strings.
#[derive(Error, thiserror_ext::ReportDebug, thiserror_ext::Arc)]
#[thiserror_ext(newtype(name = HummockError, backtrace))]
pub enum HummockErrorInner {
#[error("Magic number mismatch: expected {expected}, found: {found}")]
MagicMismatch { expected: u32, found: u32 },
#[error("Invalid format version: {0}")]
InvalidFormatVersion(u32),
#[error("Checksum mismatch: expected {expected}, found: {found}")]
ChecksumMismatch { expected: u64, found: u64 },
#[error("Invalid block")]
InvalidBlock,
#[error("Encode error: {0}")]
EncodeError(String),
#[error("Decode error: {0}")]
DecodeError(String),
#[error("ObjectStore failed with IO error: {0}")]
ObjectIoError(
#[from]
#[backtrace]
ObjectError,
),
#[error("Meta error: {0}")]
MetaError(String),
#[error("SharedBuffer error: {0}")]
SharedBufferError(String),
#[error("Wait epoch error: {0}")]
WaitEpoch(String),
#[error("Next epoch error: {0}")]
NextEpoch(String),
#[error("Change log retention miss: table {table_id}, epoch {epoch}")]View on GitHub (pinned to 6469eb736d)
Solutions
- Read the wrapped String message to identify which encoder failed and fix the producing data/schema.
- Ensure frontend and compute/storage nodes run the same RisingWave version.
- Inspect the offending row/value; cast or sanitize unsupported data before writing.
- Reproduce and report to maintainers if encoding of a valid value fails.
Example fix
// before: writing a value the encoder rejects
INSERT INTO t VALUES ('