{"record":{"id":"2470795a4154cc13","repo":"risingwavelabs/risingwave","slug":"table-fragment-of-job-job-id-not-found","errorCode":null,"errorMessage":"table fragment of job {job_id} not found","messagePattern":"table fragment of job (.+?) not found","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/frontend/src/handler/explain_analyze_stream_job.rs","lineNumber":202,"sourceCode":"            .filter(|node| {\n                node.property\n                    .as_ref()\n                    .map(|p| p.is_streaming)\n                    .unwrap_or_else(|| false)\n            })\n            .collect::<Vec<_>>();\n        Ok(stream_worker_nodes)\n    }\n\n    // TODO(kwannoel): Only fetch the names, actor_ids and graph of the fragments\n    pub(super) async fn get_fragments(\n        meta_client: &dyn FrontendMetaClient,\n        job_id: JobId,\n    ) -> Result<Vec<FragmentInfo>> {\n        let mut fragment_map = meta_client.list_table_fragments(&[job_id]).await?;\n        let mut table_fragments = fragment_map.drain();\n        let Some((fragment_job_id, table_fragment_info)) = table_fragments.next() else {\n            bail!(\"table fragment of job {job_id} not found\");\n        };\n        assert_eq!(\n            table_fragments.next(),\n            None,\n            \"expected only at most one fragment\"\n        );\n        assert_eq!(fragment_job_id, job_id);\n        Ok(table_fragment_info.fragments)\n    }\n\n    pub(super) async fn get_executor_stats(\n        handler_args: &HandlerArgs,\n        worker_nodes: &[WorkerNode],\n        executor_ids: &HashSet<ExecutorId>,\n        dispatcher_fragment_ids: &HashSet<FragmentId>,\n        profiling_duration: Duration,\n    ) -> Result<ExecutorStats> {\n        let dispatcher_fragment_ids = dispatcher_fragment_ids.iter().copied().collect::<Vec<_>>();","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/handler/explain_analyze_stream_job.rs#L184-L220","documentation":"`get_fragments` asks the meta service for the table fragments of a streaming job and expects at least one entry. An empty map means the meta service has no fragment record for that job id, so the handler bails.","triggerScenarios":"`EXPLAIN ANALYZE` / stream-job inspection for a job id whose fragments were never created, were dropped (job finished/canceled/background DDL cleaned up), or before the streaming job was scheduled on workers.","commonSituations":"Querying fragments right after DDL submission before the job is scheduled; job already finished (e.g. materialized view creation completed and fragments cleaned) or failed; stale frontend cache pointing at an old job id; meta service state lost after cluster restore.","solutions":["Verify the job is still running: `SHOW JOBS` / `SHOW MATERIALIZED VIEWS` and check the job status","Retry after a short wait if DDL was just submitted (job not yet scheduled)","If the job is finished or failed, its fragments no longer exist — inspect the successor MV/index or re-create the job","Check meta service logs for the job id if state seems inconsistent"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"-- ensure the job exists and is running before listing fragments\nSELECT * FROM rw_catalog.rw_ddl_progress;\nSHOW JOBS;","typeGuard":null,"tryCatchPattern":"match list_fragments(job_id) {\n    Err(e) if e.to_string().contains(\"table fragment of job\") => {\n        // wait and retry once; else treat job as finished/missing\n    }\n    other => other?,\n}","preventionTips":["Wait for DDL completion before querying fragments","Check job status in rw_catalog before inspecting fragments","Be aware fragments are removed once jobs finish or are dropped"],"tags":["meta","fragments","race-condition"],"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-23T08:17:48.524Z"}