{"record":{"id":"82a1b7b515dfb44a","repo":"risingwavelabs/risingwave","slug":"other-error-0","errorCode":null,"errorMessage":"Other error: {0}","messagePattern":"Other error: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/object_store/src/object/mem.rs","lineNumber":38,"sourceCode":"\nuse bytes::{BufMut, Bytes, BytesMut};\nuse fail::fail_point;\nuse futures::Stream;\nuse itertools::Itertools;\nuse risingwave_common::range::RangeBoundsExt;\nuse thiserror::Error;\nuse tokio::sync::Mutex;\n\nuse super::{\n    ObjectError, ObjectMetadata, ObjectRangeBounds, ObjectResult, ObjectStore, StreamingUploader,\n};\nuse crate::object::{ObjectDataStream, ObjectMetadataIter};\n\n#[derive(Error, Debug)]\npub enum Error {\n    #[error(\"NotFound error: {0}\")]\n    NotFound(String),\n    #[error(\"Other error: {0}\")]\n    Other(String),\n}\n\nimpl Error {\n    pub fn is_object_not_found_error(&self) -> bool {\n        matches!(self, Error::NotFound(_))\n    }\n}\n\nimpl Error {\n    fn not_found(msg: impl ToString) -> Self {\n        Error::NotFound(msg.to_string())\n    }\n\n    fn other(msg: impl ToString) -> Self {\n        Error::Other(msg.to_string())\n    }\n}","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/object_store/src/object/mem.rs#L20-L56","documentation":"The in-memory object store returns Error::Other for any failure that is not a missing key — e.g. I/O errors surfaced while operating on the memory store. It is a generic fallback variant converted into ObjectError for callers.","triggerScenarios":"Any mem-store operation failing for reasons other than absence of the key, such as wrapped IO errors or unexpected state in test/madsim environments.","commonSituations":"Test harness bugs, simulated IO failures in madsim, or misuse of the mem store API outside its supported behavior.","solutions":["Inspect the embedded message for the underlying cause","If running under madsim, check simulated failure injection settings","Re-run the test or workload — transient simulated faults may not recur","Report a bug if the mem store (which should not fail) returns Other in normal use"],"exampleFix":"// before: ignoring the distinction between variants\nErr(e) => return Err(e.into()),\n// after: branch on the known variants\nErr(e @ crate::object::mem::Error::NotFound(_)) => { /* handle absence */ }\nErr(e) => return Err(ObjectError::internal(e.to_string())),","handlingStrategy":"try-catch","validationCode":"null","typeGuard":"fn is_other_mem_error(e: &crate::object::mem::Error) -> bool {\n    matches!(e, crate::object::mem::Error::Other(_))\n}","tryCatchPattern":"match mem_store.read(key, None).await {\n    Ok(d) => d,\n    Err(e @ crate::object::mem::Error::NotFound(_)) => { /* absence path */ }\n    Err(e) => return Err(ObjectError::internal(format!(\"mem store: {}\", e))),\n}","preventionTips":["Match explicitly on the mem::Error enum rather than string matching","Log the embedded message — it carries the underlying cause","Report upstream if the pure in-memory store returns Other in normal operation"],"tags":["rust","object-store","memory-store"],"backgroundTag":"unexpected-response-shape","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"}