{"record":{"id":"62a1571d9ea15036","repo":"risingwavelabs/risingwave","slug":"internal-error-0-62a157","errorCode":null,"errorMessage":"Internal error: {0}","messagePattern":"Internal error: (.+?)","errorType":"exception","errorClass":"ObjectError","httpStatus":null,"severity":"error","filePath":"src/object_store/src/object/error.rs","lineNumber":46,"sourceCode":"pub enum ObjectErrorInner {\n    #[error(\"s3 error: {inner}\")]\n    S3 {\n        // TODO: remove this after switch s3 backend to opendal\n        should_retry: bool,\n        #[source]\n        inner: BoxedError,\n    },\n    #[error(\"disk error: {msg}\")]\n    Disk {\n        msg: String,\n        #[source]\n        inner: io::Error,\n    },\n    #[error(transparent)]\n    Opendal(#[from] opendal::Error),\n    #[error(transparent)]\n    Mem(#[from] crate::object::mem::Error),\n    #[error(\"Internal error: {0}\")]\n    #[construct(skip)]\n    Internal(String),\n    #[cfg(madsim)]\n    #[error(transparent)]\n    Sim(#[from] crate::object::sim::SimError),\n\n    #[error(\"Timeout error: {0}\")]\n    Timeout(String),\n}\n\nimpl ObjectError {\n    pub fn internal(msg: impl ToString) -> Self {\n        ObjectErrorInner::Internal(msg.to_string()).into()\n    }\n\n    /// Tells whether the error indicates the target object is not found.\n    pub fn is_object_not_found_error(&self) -> bool {\n        match self.inner() {","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/object_store/src/object/error.rs#L28-L64","documentation":"ObjectError::Internal is a catch-all for unexpected internal failures in the RisingWave object store layer. It is constructed via ObjectError::internal(msg) (the #[construct(skip)] variant is only creatable through that helper) and signals a condition that should not normally occur, such as an inconsistent store state or an unrecoverable logic error.","triggerScenarios":"Any object-store code path calling ObjectError::internal(msg) — e.g. invalid store state, impossible responses from a backend, or wrapped logic errors that do not fit a specific variant.","commonSituations":"Corrupted metadata from remote stores, mismatches between expected and actual object state after failover, or bugs surfaced during Hummock compaction reads.","solutions":["Read the embedded message and the object-store logs around it to identify which internal assertion failed","Retry the read/write operation; transient backend inconsistencies often resolve on retry","Check for known issues matching the message in the RisingWave repo and upgrade if fixed","File an issue with the full message and stack trace if reproducible"],"exampleFix":"// before: surfacing a raw unwrap-style failure\nlet meta = store.metadata(path).unwrap();\n// after: handle the ObjectResult properly\nlet meta = store.metadata(path).await.map_err(|e| {\n    tracing::error!(error = ?e, \"metadata lookup failed\");\n    e\n})?;","handlingStrategy":"try-catch","validationCode":"null","typeGuard":"fn is_internal_object_error(e: &ObjectError) -> bool {\n    e.to_string().starts_with(\"Internal error:\")\n}","tryCatchPattern":"match store.read(path, range).await {\n    Ok(d) => d,\n    Err(e) if e.to_string().starts_with(\"Internal error:\") => {\n        tracing::error!(error = ?e, \"object store internal error\");\n        return Err(e.into());\n    }\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Always handle ObjectResult with ? or explicit match instead of unwrap","Enable tracing for the object store module to capture context around internal errors","Keep RisingWave updated; internal errors often indicate fixed bugs"],"tags":["rust","object-store","internal-error"],"backgroundTag":"internal-invariant-violation","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}