{"record":{"id":"f5cc824687ac61ee","repo":"risingwavelabs/risingwave","slug":"cannot-find-streamactor-of-actor","errorCode":null,"errorMessage":"cannot find StreamActor of actor {}","messagePattern":"cannot find StreamActor of actor (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"src/meta/src/barrier/mod.rs","lineNumber":177,"sourceCode":"        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                    }\n                }\n            }\n            for (job_id, fragments) in database_jobs {\n                let mut committed_epochs =\n                    InflightFragmentInfo::existing_table_ids(fragments.values()).map(|table_id| {\n                        (\n                            table_id,\n                            *state_table_committed_epochs","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/barrier/mod.rs#L159-L195","documentation":"validate_database_info cross-checks each fragment actor against the provided stream_actors map. If an actor id present in the fragment's actor list is missing from stream_actors, recovery aborts. This detects a mismatch between fragment topology and the serialized actor table.","triggerScenarios":"Recovery-time validation where fragment.actors contains actor_id not present in the stream_actors map built from job metadata — inconsistent/duplicated metadata after failover or partial metadata update.","commonSituations":"Partial catalog updates during crashes; corrupted or desynchronized metadata snapshots; bugs in job rescheduling that drop actors.","solutions":["Re-run recovery after meta restart to rebuild consistent metadata from the durable snapshot","Repair the job metadata so every fragment actor has a matching StreamActor record","Drop and recreate the corrupted job if its metadata cannot be reconciled","File a bug with the job/fragment ids; this indicates a metadata serialization bug"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let missing: Vec<_> = fragments.iter()\n    .flat_map(|f| f.actors.keys())\n    .filter(|id| !stream_actors.contains_key(*id))\n    .collect();\nif !missing.is_empty() { return Err(format!(\"actors missing from metadata: {:?}\", missing)); }","typeGuard":null,"tryCatchPattern":"if e.to_string().contains(\"cannot find StreamActor\") {\n    rebuild_job_metadata(job_id)?; // or drop/recreate the corrupted job\n}","preventionTips":["Write fragment and actor metadata atomically","Add consistency checks after job metadata updates","Snapshot recovery should be validated end-to-end before activation"],"tags":["rust","meta","recovery","actor","metadata"],"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"}