risingwavelabs/risingwave · error · HummockError

Invalid block

Error message

Invalid block

What it means

Hummock encountered a block whose contents fail structural validation even though the magic/version may have been acceptable. It is thrown when a deserialized block cannot be interpreted as a valid data block. This guards the read path against malformed or corrupt storage data.

Solutions

  1. Remove the affected SST from the object store and force recovery from replica/backup.
  2. Verify the object store client configuration (endpoints, custom store) is not mangling data.
  3. Check for concurrent/mismatched binary versions accessing the same store.
  4. Escalate with the file/offset from logs to RisingWave maintainers if it reproduces.
Defensive patterns

Strategy: try-catch

Try / catch

// Rust
match hummock_read(...) {
    Err(e) if e.to_string() == "Invalid block" => {
        // treat as corruption: quarantine object, recover from replica
    }
    r => r?,
}

Prevention

When it happens

Trigger: Reading an SST block where the decoded layout fails block-level invariants (e.g. wrong structure after decode).

Common situations: Corrupted block payload in object storage; truncated downloads; reading data written by incompatible code paths; faulty custom object store implementations.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


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

Appendix: source

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

// limitations under the License.

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}")]

View on GitHub (pinned to 6469eb736d)