{"record":{"id":"ad5cac5a93d1783e","repo":"risingwavelabs/risingwave","slug":"backup-job-status-not-found-job","errorCode":null,"errorMessage":"backup job status not found: job {}, {}","messagePattern":"backup job status not found: job (.+?), (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/ctl/src/cmd_impl/meta/backup_meta.rs","lineNumber":38,"sourceCode":"use crate::CtlContext;\n\npub async fn backup_meta(context: &CtlContext, remarks: Option<String>) -> anyhow::Result<()> {\n    let meta_client = context.meta_client().await?;\n    let job_id = meta_client.backup_meta(remarks).await?;\n    loop {\n        let (job_status, message) = meta_client.get_backup_job_status(job_id).await?;\n        match job_status {\n            BackupJobStatus::Running => {\n                tracing::info!(\"backup job is still running: job {}, {}\", job_id, message);\n                tokio::time::sleep(Duration::from_secs(1)).await;\n            }\n            BackupJobStatus::Succeeded => {\n                tracing::info!(\"backup job succeeded: job {}, {}\", job_id, message);\n                tracing::info!(\"rw version: {}\", RW_VERSION);\n                break;\n            }\n            BackupJobStatus::NotFound => {\n                return Err(anyhow::anyhow!(\n                    \"backup job status not found: job {}, {}\",\n                    job_id,\n                    message\n                ));\n            }\n            BackupJobStatus::Failed => {\n                return Err(anyhow::anyhow!(\n                    \"backup job failed: job {}, {}\",\n                    job_id,\n                    message\n                ));\n            }\n            _ => unreachable!(\"unknown backup job status\"),\n        }\n    }\n    Ok(())\n}\n","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/ctl/src/cmd_impl/meta/backup_meta.rs#L20-L56","documentation":"backup_meta polls the meta node for a backup job's status. If the polled status comes back NotFound, the job (or its status) does not exist on the meta side, so the ctl command returns this error including the job id and message.","triggerScenarios":"Polling a backup job id that was never created, was already cleaned up, or whose record was lost after a meta restart/failover during `rw meta backup-meta`.","commonSituations":"Meta node restarted mid-backup losing the job record; querying with a stale job id from a previous cluster; a bug/race where the status is read before the job is registered.","solutions":["Re-run the backup-meta command to create a fresh backup job","Verify the meta node is the same leader that created the job (no failover in between)","Check meta logs around the job id to confirm whether it was created and garbage-collected"],"exampleFix":"null","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match res {\n    Err(e) if e.to_string().contains(\"backup job status not found\") => {\n        eprintln!(\"job lost (meta restart?); re-run backup-meta\");\n    }\n    other => other.expect(\"backup failed\"),\n}","preventionTips":["Use the job id immediately after creating it; never reuse old ids","Avoid meta failovers/restarts during backups","Confirm meta leader stability before long-running backup jobs"],"tags":["meta","backup","job-status"],"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"}