{"record":{"id":"19ab9e36774ef32b","repo":"risingwavelabs/risingwave","slug":"failed-to-access-meta-store","errorCode":null,"errorMessage":"failed to access meta store","messagePattern":"failed to access meta store","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/meta/src/hummock/error.rs","lineNumber":30,"sourceCode":"// See the License for the specific language governing permissions and\n// limitations under the License.\n\nuse risingwave_common::catalog::TableId;\nuse risingwave_hummock_sdk::{HummockContextId, HummockSstableObjectId};\nuse risingwave_object_store::object::ObjectError;\nuse risingwave_rpc_client::error::ToTonicStatus;\nuse sea_orm::DbErr;\nuse thiserror::Error;\n\nuse crate::model::MetadataModelError;\n\npub type Result<T> = std::result::Result<T, Error>;\n\n#[derive(Error, Debug)]\npub enum Error {\n    #[error(\"invalid hummock context {0}\")]\n    InvalidContext(HummockContextId),\n    #[error(\"failed to access meta store\")]\n    MetaStore(\n        #[source]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(transparent)]\n    ObjectStore(\n        #[from]\n        #[backtrace]\n        ObjectError,\n    ),\n    #[error(\"compactor {0} is disconnected\")]\n    CompactorUnreachable(HummockContextId),\n    #[error(\"compaction group error: {0}\")]\n    CompactionGroup(String),\n    #[error(\"SST {0} is invalid\")]\n    InvalidSst(HummockSstableObjectId),\n    #[error(\"invalid manual compaction option: {0}\")]","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/hummock/error.rs#L12-L48","documentation":"hummock::Error::MetaStore wraps any failure accessing the metadata store (SeaORM-backed SQL database, e.g. PostgreSQL or SQLite) that the meta node uses to persist Hummock metadata. The inner anyhow::Error is the `#[source]`, so the real database error (connection failure, lock timeout, constraint violation) is attached. Notably, `Error::retryable()` returns true for this variant, marking it as safe to retry.","triggerScenarios":"Any Hummock meta operation that reads/writes the metadata database and hits a DbErr converted into this error: writes of SST info, version deltas, pinned snapshots, compaction group config; DB connection loss; constraint violations during concurrent writes.","commonSituations":"Metadata database (configured meta store) is unreachable, restarted, or saturated; connection pool exhausted; DB migrations not applied after upgrade; disk full on the meta store host.","solutions":["Check the `source` chain for the underlying DbErr and database error code","Verify the meta store database is reachable and healthy (network, auth, disk space)","Retry the operation — this variant is explicitly marked retryable","Check meta store connection pool sizing and DB load","Ensure schema migrations for the meta store are applied for your RisingWave version"],"exampleFix":"// before\nlet rows = meta_store.list_sstables().await?; // hummock::Error::MetaStore bubbles up\n// after\nlet rows = retry(backoff::Exponential::default()).try(|| async {\n    meta_store.list_sstables().await\n}).await?; // MetaStore errors are retryable per Error::retryable()","handlingStrategy":"retry","validationCode":"// Health-check the meta store before Hummock operations\nsqlx::query(\"SELECT 1\").fetch_one(&meta_db_pool).await\n    .map_err(|e| format!(\"meta store unhealthy: {e}\"))?;","typeGuard":"fn is_meta_store_error(e: &hummock::Error) -> Option<&anyhow::Error> {\n    match e { hummock::Error::MetaStore(src) => Some(src), _ => None }\n}","tryCatchPattern":"match hummock_result {\n    Err(e @ hummock::Error::MetaStore(_)) if e.retryable() => {\n        backoff_retry(op).await? // this variant is retryable by design\n    }\n    other => other?,\n}","preventionTips":["Monitor meta store DB health (connections, disk, replication lag)","Size the connection pool for peak meta traffic","Apply meta store schema migrations on every upgrade","Run the meta store on durable, backed-up infrastructure"],"tags":["metastore","database","hummock"],"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"}