{"record":{"id":"706876669af6b0d2","repo":"risingwavelabs/risingwave","slug":"sled-error-0","errorCode":null,"errorMessage":"Sled error: {0}","messagePattern":"Sled error: (.+?)","errorType":"error_code","errorClass":"StorageError","httpStatus":null,"severity":"error","filePath":"src/storage/src/error.rs","lineNumber":45,"sourceCode":"        #[from]\n        HummockError,\n    ),\n\n    #[error(\"Deserialize row error: {0}\")]\n    DeserializeRow(\n        #[from]\n        #[backtrace]\n        ValueEncodingError,\n    ),\n\n    #[error(\"Serialize/deserialize error: {0}\")]\n    SerdeError(\n        #[from]\n        #[backtrace]\n        memcomparable::Error,\n    ),\n\n    #[error(\"Sled error: {0}\")]\n    Sled(\n        #[backtrace]\n        #[from]\n        sled::Error,\n    ),\n\n    #[error(\"MemTable error: {0}\")]\n    MemTable(\n        #[backtrace]\n        #[from]\n        Box<MemTableError>,\n    ),\n}\n\npub type StorageResult<T> = std::result::Result<T, StorageError>;\n","sourceCodeStart":27,"sourceCodeEnd":61,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/storage/src/error.rs#L27-L61","documentation":"A StorageError variant wrapping sled::Error. Sled is an embedded key-value store used in some RisingWave paths (e.g. local meta/state backends); any sled engine failure — I/O error, corruption, lock contention — is wrapped here.","triggerScenarios":"Any operation on a sled-backed store returning Err: opening a corrupted database file, I/O failures on the data directory, incompatible sled data format versions.","commonSituations":"Disk full or permission problems on the data directory; corrupted embedded DB after a crash; running with a sled data directory created by a different sled version.","solutions":["Check disk space, permissions, and health of the directory backing the sled database","If the DB is corrupt or from an incompatible sled version, re-initialize the directory and rebuild state (or restore from backup)","Enable sled recovery options only after backing up the data directory"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"fn sled_dir_ok(path: &std::path::Path) -> bool {\n    path.exists() && path.is_dir()\n        && std::fs::read_dir(path).map(|mut d| d.next().is_some()).unwrap_or(false)\n}","typeGuard":null,"tryCatchPattern":"match open_store().await {\n    Err(e) if matches!(e.kind(), StorageErrorKind::Sled(_)) => {\n        // check disk space/permissions, or re-init corrupted sled dir\n    }\n    other => other,\n}","preventionTips":["Monitor disk space and directory permissions for embedded DB paths","Back up sled data directories before upgrades","Never share a sled directory across different sled versions"],"tags":["rust","storage","sled","embedded-db"],"backgroundTag":"database-query-failed","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"}