{"record":{"id":"1b668703c97048da","repo":"risingwavelabs/risingwave","slug":"storage-error-0","errorCode":null,"errorMessage":"Storage error: {0}","messagePattern":"Storage error: (.+?)","errorType":"error_code","errorClass":"BatchError","httpStatus":null,"severity":"error","filePath":"src/batch/src/error.rs","lineNumber":43,"sourceCode":"use risingwave_dml::error::DmlError;\nuse risingwave_expr::ExprError;\nuse risingwave_pb::PbFieldNotFound;\nuse risingwave_rpc_client::error::{RpcError, ToTonicStatus};\nuse risingwave_storage::error::StorageError;\nuse thiserror::Error;\nuse thiserror_ext::Construct;\nuse tokio_postgres::Error as PostgresError;\nuse tonic::Status;\n\npub type Result<T> = std::result::Result<T, BatchError>;\n/// Batch result with shared error.\npub type SharedResult<T> = std::result::Result<T, Arc<BatchError>>;\n\npub trait Error = std::error::Error + Send + Sync + 'static;\n\n#[derive(Error, Debug, Construct)]\npub enum BatchError {\n    #[error(\"Storage error: {0}\")]\n    Storage(\n        #[backtrace]\n        #[from]\n        StorageError,\n    ),\n\n    #[error(\"Array error: {0}\")]\n    Array(\n        #[from]\n        #[backtrace]\n        ArrayError,\n    ),\n\n    #[error(\"Expr error: {0}\")]\n    Expr(\n        #[from]\n        #[backtrace]\n        ExprError,","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/batch/src/error.rs#L25-L61","documentation":"BatchError::Storage wraps a StorageError into the batch engine's error type via thiserror's #[from], displaying as \"Storage error: {0}\". It surfaces when a batch query's executor hits a storage-layer failure (object store, Hummock, read errors) while fetching data.","triggerScenarios":"Any storage operation invoked from the batch path returns Err(StorageError) and is converted with `?` — e.g. Hummock reads, SST lookups, object-store I/O during a table scan.","commonSituations":"Object store (S3/MinIO) misconfiguration or outage; network issues between compute and storage; state store unavailability during batch queries on materialized views; corrupted or missing SST files.","solutions":["Read the wrapped StorageError message for the root cause and fix the underlying storage issue (credentials, endpoint, connectivity).","Verify object-store configuration (endpoint, region, keys) in the compute node config.","Check Hummock/meta service health and retry the query once storage recovers.","If an SST or data file is reported missing/corrupt, follow RisingWave's state-store recovery guidance."],"exampleFix":"// before: wrong/missing S3 endpoint in risingwave.toml\n[state_store]\n= \"s3://bucket\"\n// after: valid endpoint and credentials\n[state_store]\n= \"s3://bucket\"\n// plus S3_ENDPOINT, S3_ACCESS_KEY, S3_SECRET set correctly","handlingStrategy":"retry","validationCode":"// Rust: pre-flight object store connectivity check\nlet ok = tonic_health::check_storage_endpoint(&endpoint).await.is_ok();\nif !ok { /* fix endpoint/credentials before running batch queries */ }","typeGuard":null,"tryCatchPattern":"match query_result {\n    Err(BatchError::Storage(storage_err)) => {\n        // inspect storage_err root cause; retry with backoff for transient I/O\n    }\n    other => other,\n}","preventionTips":["Validate object-store config (endpoint, credentials, region) before serving queries.","Monitor storage/network health between compute and Hummock/object store.","Set up alerts on storage error rates and retries."],"tags":["storage","batch","hummock","object-store"],"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-14T16:17:12.679Z"}