{"record":{"id":"e8ca1fb991af7323","repo":"risingwavelabs/risingwave","slug":"memtable-error-0","errorCode":null,"errorMessage":"MemTable error: {0}","messagePattern":"MemTable error: (.+?)","errorType":"error_code","errorClass":"StorageError","httpStatus":null,"severity":"error","filePath":"src/storage/src/error.rs","lineNumber":52,"sourceCode":"        #[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":34,"sourceCodeEnd":61,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/storage/src/error.rs#L34-L61","documentation":"A StorageError variant wrapping Box<MemTableError>. The mem-table layer handles recently written, not-yet-flushed data; failures there (e.g. write conflicts, dirty-seal errors) are wrapped into the unified StorageError for callers.","triggerScenarios":"Operations touching MemTableError-producing paths — e.g. a write to a memory table fails or a read of unflushed state encounters an inconsistency — converted into StorageError via #[from] on Box<MemTableError>.","commonSituations":"Write conflicts under high concurrent update load, internal state inconsistencies after failover, bugs in the mem-table coordination path.","solutions":["Read the inner MemTableError for the specific cause (e.g. conflict vs sealed table)","Retry conflicting writes; if conflicts persist, reduce concurrent writers to the same key or check upstream version-commit logic","If it recurs after failover, restart the compute node to rebuild mem-table state and report if reproducible"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match write(key, val).await {\n    Err(e) if matches!(e.kind(), StorageErrorKind::MemTable(_)) => {\n        // inspect inner MemTableError; retry conflicts with backoff\n        retry_with_backoff(|| write(key, val)).await\n    }\n    other => other,\n}","preventionTips":["Minimize concurrent writers to the same key range","Use idempotent retries with backoff on mem-table conflicts","Rebuild mem-table state (node restart) after failover-related inconsistencies"],"tags":["rust","storage","memtable","error-wrapping"],"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-14T16:17:12.679Z"}