risingwavelabs/risingwave · error · HummockError

SharedBuffer error

Error message

SharedBuffer error: {0}

What it means

An operation on Hummock's in-memory shared buffer (write batch/memtable staging) failed, with the reason in the String payload. Shared buffers hold recently written data before it is uploaded as SSTs, so this surfaces during flush/ingest handling of that buffer. The string describes the specific failure.

Solutions

  1. Read the wrapped message to pinpoint the shared-buffer operation that failed.
  2. Check hummock shared buffer size config and worker memory limits; increase if under-provisioned.
  3. Retry the write/flush; transient failures during flush usually succeed after retry.
  4. Report to maintainers with the message if it reproduces on a supported configuration.

Example fix

// before
[storage] shared_buffer_size = "64MB"  # too small for write load
// after
[storage] shared_buffer_size = "1GB"
Defensive patterns

Strategy: try-catch

Try / catch

// Rust
match hummock_write(batch) {
    Err(e) if e.to_string().starts_with("SharedBuffer error") => {
        // inspect message; consider retry after buffer pressure subsides
    }
    r => r?,
}

Prevention

When it happens

Trigger: Writing to or flushing a write batch/shared buffer where the buffer-layer operation (build/append/serialize) returns an error.

Common situations: Memory pressure or misconfigured shared buffer size; serialization failure of buffered data; internal bugs in batch handling under concurrent writes.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


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

Appendix: source

Thrown at src/storage/src/hummock/error.rs:45

    #[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}")]
    ChangeLogRetentionMiss { table_id: TableId, epoch: u64 },
    #[error("Time-travel version expired: table {table_id}, epoch {epoch}")]
    TimeTravelVersionExpired { table_id: TableId, epoch: u64 },
    #[error(
        "Committed epoch mismatch: table {table_id}, committed_epoch {committed_epoch}, read_epoch {read_epoch}"
    )]
    CommittedEpochMismatch {
        table_id: TableId,
        committed_epoch: u64,
        read_epoch: u64,
    },
    #[error("Barrier read is unavailable for now. Likely the cluster is recovering")]

View on GitHub (pinned to 6469eb736d)