{"record":{"id":"eb4be97536ee396a","repo":"risingwavelabs/risingwave","slug":"worker-id-for-actor-does-not-exist","errorCode":null,"errorMessage":"worker_id {} for actor {} does not exist","messagePattern":"worker_id (.+?) for actor (.+?) does not exist","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"src/meta/src/barrier/mod.rs","lineNumber":169,"sourceCode":"    cdc_table_snapshot_splits: HashMap<JobId, CdcTableSnapshotSplits>,\n}\n\nimpl BarrierWorkerRuntimeInfoSnapshot {\n    fn validate_database_info(\n        database_id: DatabaseId,\n        database_jobs: &HashMap<JobId, HashMap<FragmentId, InflightFragmentInfo>>,\n        active_streaming_nodes: &ActiveStreamingWorkerNodes,\n        stream_actors: &HashMap<ActorId, StreamActor>,\n        state_table_committed_epochs: &HashMap<TableId, u64>,\n    ) -> MetaResult<()> {\n        {\n            for fragment in database_jobs.values().flat_map(|job| job.values()) {\n                for (actor_id, actor) in &fragment.actors {\n                    if !active_streaming_nodes\n                        .current()\n                        .contains_key(&actor.worker_id)\n                    {\n                        return Err(anyhow!(\n                            \"worker_id {} for actor {} does not exist\",\n                            actor.worker_id,\n                            actor_id\n                        )\n                        .into());\n                    }\n                    if !stream_actors.contains_key(actor_id) {\n                        return Err(anyhow!(\"cannot find StreamActor of actor {}\", actor_id).into());\n                    }\n                }\n                for state_table_id in &fragment.state_table_ids {\n                    if !state_table_committed_epochs.contains_key(state_table_id) {\n                        return Err(anyhow!(\n                            \"state table {} is not registered to hummock\",\n                            state_table_id\n                        )\n                        .into());\n                    }","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/barrier/mod.rs#L151-L187","documentation":"validate_database_info (recovery validation) checks that every streaming actor's assigned worker_id exists among the active streaming compute nodes. If an actor references a worker not in active_streaming_nodes, recovery aborts with this error, indicating inconsistent cluster metadata between the job's fragment graph and the live worker set.","triggerScenarios":"Recovery where an actor's worker_id is absent from active streaming nodes — e.g. a compute node was removed and its actors were not reassigned, or stale worker mapping in the fragment metadata.","commonSituations":"Compute node scale-in without proper actor rescheduling; worker crash between metadata snapshots; recovery from an inconsistent metadata checkpoint.","solutions":["Ensure the worker is running and registered so active_streaming_nodes includes it, then retry recovery","If the worker is permanently gone, reschedule/rebuild affected jobs so actors map to live workers","Check metadata consistency (actor->worker mapping) and repair stale fragment metadata","Report as a bug if actor placement produced a worker_id that never existed"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// before recovery-sensitive operations, confirm all actor worker_ids are live\nfor actor in all_actors() {\n    if !active_nodes.contains_key(&actor.worker_id) {\n        return Err(format!(\"worker {} for actor {} missing\", actor.worker_id, actor.actor_id));\n    }\n}","typeGuard":"fn is_worker_active(worker_id: u32, nodes: &HashMap<u32, WorkerNode>) -> bool { nodes.contains_key(&worker_id) }","tryCatchPattern":"match validate_database_info(...) {\n    Err(e) if e.to_string().contains(\"does not exist\") => {\n        // reschedule actors of missing workers, then retry recovery\n        reschedule_actors_of_missing_workers();\n        retry_recovery().await;\n    }\n    Err(e) => return Err(e),\n    Ok(v) => v,\n}","preventionTips":["Keep actor placement in sync with worker liveness","Drain and reschedule actors before decommissioning compute nodes","Monitor worker registrations during recovery"],"tags":["rust","meta","recovery","worker","consistency"],"backgroundTag":"entity-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"}