{"record":{"id":"b7dff1e5bbd274fc","repo":"risingwavelabs/risingwave","slug":"0-id-not-found-1","errorCode":null,"errorMessage":"{0} id not found: {1}","messagePattern":"(.+?) id not found: (.+?)","errorType":"error_code","errorClass":"MetaError","httpStatus":null,"severity":"error","filePath":"src/meta/src/error.rs","lineNumber":76,"sourceCode":"\n    #[error(transparent)]\n    RpcError(\n        #[from]\n        #[backtrace]\n        RpcError,\n    ),\n\n    #[error(\"{0}\")]\n    PermissionDenied(String),\n\n    #[error(\"Invalid worker: {0}, {1}\")]\n    InvalidWorker(WorkerId, String),\n\n    #[error(\"Invalid parameter: {0}\")]\n    InvalidParameter(#[message] String),\n\n    // Used for catalog errors.\n    #[error(\"{0} id not found: {1}\")]\n    #[construct(skip)]\n    CatalogIdNotFound(&'static str, String),\n\n    #[error(\"table_fragment does not exist: id={0}\")]\n    FragmentNotFound(FragmentId),\n\n    #[error(\"{0} named {1} already exists{under_creation}\", under_creation = (.2).map(|_| \" and is still being created\").unwrap_or(\"\"))]\n    Duplicated(\n        &'static str,\n        String,\n        // if under creation, take streaming job id, otherwise None\n        Option<JobId>,\n    ),\n\n    #[error(\"Service unavailable: {0}\")]\n    Unavailable(#[message] String),\n\n    #[error(\"Election failed: {0}\")]","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/error.rs#L58-L94","documentation":"A catalog object (table, database, schema, source, etc.) could not be found by its id. The first field names the object type (e.g. \"table\", \"database\"), the second carries details. This variant is constructed internally (#[construct(skip)]) via From impls from catalog errors.","triggerScenarios":"Referencing a catalog id in DDL/DML or meta RPC after the object was dropped, using an id from a stale catalog snapshot, or operations on objects from a different cluster/database.","commonSituations":"Concurrent DROP and SELECT/DDL from another session, replaying operations against a restored cluster where ids changed, hard-coded ids in scripts/risectl commands.","solutions":["Re-resolve the object by name (e.g. `SHOW TABLES`) instead of reusing a cached id.","Check whether the object was dropped by another session; recreate it if needed.","If targeting a different cluster after restore/clone, re-fetch ids from the new catalog.","Retry the operation after catalog refresh if it was a race with a drop."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// resolve by name right before use instead of reusing a cached id\nlet table = catalog.get_table_by_name(name).await?;\nlet table_id = table.id;","typeGuard":null,"tryCatchPattern":"match meta_result {\n    Err(MetaError::CatalogIdNotFound(kind, id)) => { /* re-resolve by name or recreate */ }\n    other => other?,\n}","preventionTips":["Don't cache catalog ids across sessions, restarts, or cluster restores.","Re-resolve by name immediately before dependent operations.","Handle concurrent drop scenarios by re-fetching and retrying once."],"tags":["meta","catalog","not-found"],"backgroundTag":"record-not-found","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"}