{"record":{"id":"3b36922c84a4617f","repo":"risingwavelabs/risingwave","slug":"metastorage-error-0","errorCode":null,"errorMessage":"MetaStorage error: {0}","messagePattern":"MetaStorage error: (.+?)","errorType":"error_code","errorClass":"BackupError","httpStatus":null,"severity":"error","filePath":"src/storage/backup/src/error.rs","lineNumber":28,"sourceCode":"// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nuse risingwave_common::error::BoxedError;\nuse thiserror::Error;\n\npub type BackupResult<T> = Result<T, BackupError>;\n\n#[derive(Error, Debug)]\npub enum BackupError {\n    #[error(\"BackupStorage error: {0}\")]\n    BackupStorage(\n        #[backtrace]\n        #[source]\n        BoxedError,\n    ),\n    #[error(\"MetaStorage error: {0}\")]\n    MetaStorage(\n        #[backtrace]\n        #[source]\n        BoxedError,\n    ),\n    #[error(\"StateStorage error: {0}\")]\n    StateStorage(\n        #[backtrace]\n        #[source]\n        BoxedError,\n    ),\n    #[error(\"Encoding error: {0}\")]\n    Encoding(\n        #[backtrace]\n        #[source]\n        BoxedError,\n    ),\n    #[error(\"Decoding error: {0}\")]","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/storage/backup/src/error.rs#L10-L46","documentation":"`BackupError::MetaStorage` wraps an underlying error from the meta storage backend encountered during backup or restore. Backup/restore reads and writes metadata snapshots in the meta store; failures there are boxed into this variant with the original error preserved as source and backtrace.","triggerScenarios":"During `meta_backup` snapshot creation or restore: a failed meta store read/write (e.g. get latest snapshot, list/version checks, writing snapshot data into the meta store).","commonSituations":"Meta store (e.g. etcd/memory backend) unavailable or unhealthy; restore run against a meta store with connectivity problems; transient DB errors during long backup jobs.","solutions":["Check the wrapped source error to identify which meta store operation failed.","Verify the meta store service is running and reachable from the meta node.","Retry the backup/restore after the meta store recovers; investigate persistence layer logs."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Verify meta store connectivity before backup/restore\n// e.g. etcd client health check\nlet healthy = etcd_client.status().await.is_ok();\ndebug_assert!(healthy, \"meta store must be reachable before backup\");","typeGuard":null,"tryCatchPattern":"match restore_backup().await {\n    Err(e @ BackupError::MetaStorage(_)) => {\n        tracing::error!(source = ?e.source(), \"meta store failure during restore\");\n        // alert and retry after meta store recovers\n    }\n    other => other?,\n}","preventionTips":["Monitor meta store (etcd) health and latency.","Schedule backups during periods of meta store stability.","Avoid running meta backup/restore while the meta store is under heavy load or upgrade."],"tags":["backup","meta-storage","rust","thiserror"],"backgroundTag":"database-write-failed","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"}