{"record":{"id":"31f941bb3ac3f174","repo":"risingwavelabs/risingwave","slug":"expected-noshuffle-but-got","errorCode":null,"errorMessage":"expected NoShuffle but got {:?}","messagePattern":"expected NoShuffle but got (.+?)","errorType":"exception","errorClass":"MetaError","httpStatus":null,"severity":"error","filePath":"src/meta/src/controller/fragment.rs","lineNumber":1755,"sourceCode":"\n        let fragment_relation: DispatcherType = FragmentRelation::find()\n            .select_only()\n            .column(fragment_relation::Column::DispatcherType)\n            .filter(fragment_relation::Column::SourceFragmentId.eq(source_fragment_id))\n            .filter(fragment_relation::Column::TargetFragmentId.eq(source_backfill_fragment_id))\n            .into_tuple()\n            .one(&txn)\n            .await?\n            .ok_or_else(|| {\n                anyhow!(\n                    \"no fragment connection from source fragment {} to source backfill fragment {}\",\n                    source_fragment_id,\n                    source_backfill_fragment_id\n                )\n            })?;\n\n        if fragment_relation != DispatcherType::NoShuffle {\n            return Err(anyhow!(\"expected NoShuffle but got {:?}\", fragment_relation).into());\n        }\n\n        let load_fragment_distribution_type = |txn, fragment_id: FragmentId| async move {\n            let result: MetaResult<DistributionType> = try {\n                FragmentModel::find_by_id(fragment_id)\n                    .select_only()\n                    .column(fragment::Column::DistributionType)\n                    .into_tuple()\n                    .one(txn)\n                    .await\n                    .map_err(MetaError::from)?\n                    .ok_or_else(|| {\n                        MetaError::from(anyhow!(\"failed to find fragment: {}\", fragment_id))\n                    })?\n            };\n            result\n        };\n","sourceCodeStart":1737,"sourceCodeEnd":1773,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/controller/fragment.rs#L1737-L1773","documentation":"The same code path loads the dispatcher type of the source→source-backfill fragment relation and requires it to be DispatcherType::NoShuffle. Any other dispatcher type yields 'expected NoShuffle but got {:?}', because the source backfill rewrite is only valid for directly connected (no-shuffle) fragments.","triggerScenarios":"Triggering a source backfill for a table whose source→backfill fragment relation row stores a dispatcher type other than NoShuffle — e.g. metadata written by a different plan generation or manually modified relation rows.","commonSituations":"Upgrades across versions where the default dispatch strategy changed; corrupted or hand-edited meta store; retrying a rewrite on a table whose fragment graph was produced by experimental/patched planner code.","solutions":["Inspect the fragment_relation row's dispatcher type for the reported fragment pair","Confirm the table was created by the currently deployed RisingWave version; recreate the table if it predates a schema change","Do not manually edit the meta store; if it was edited, restore from backup","File a RisingWave issue if stock metadata produces a non-NoShuffle edge here"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let dispatch = load_relation_dispatcher(txn, src, dst).await?;\nif dispatch != DispatcherType::NoShuffle { return Err(skip_backfill()); }","typeGuard":"fn is_no_shuffle(d: &DispatcherType) -> bool { matches!(d, DispatcherType::NoShuffle) }","tryCatchPattern":"if let Err(e) = rewrite_for_source_backfill(...).await { if e.to_string().contains(\"expected NoShuffle\") { /* metadata from unsupported layout */ } }","preventionTips":["Avoid manual edits to fragment_relation dispatcher values","Recreate tables created under incompatible planner versions","Assert NoShuffle edges in meta consistency tests"],"tags":["fragment","backfill","dispatcher","metadata"],"backgroundTag":"invalid-enum-value","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"}