{"record":{"id":"fdb1de5801842bc8","repo":"risingwavelabs/risingwave","slug":"unsupported-split-type-for-adaptive-splits","errorCode":null,"errorMessage":"Unsupported split type for adaptive splits: {:?}","messagePattern":"Unsupported split type for adaptive splits: (.+?)","errorType":"exception","errorClass":"ConnectorError","httpStatus":null,"severity":"error","filePath":"src/connector/src/source/util.rs","lineNumber":67,"sourceCode":"            for idx in 0..actor_count {\n                let split_id: Arc<str> = format!(\"{}-{}\", split.subscription, idx).into();\n                new_splits.insert(\n                    split_id,\n                    SplitImpl::GooglePubsub(PubsubSplit {\n                        index: idx as u32,\n                        subscription: split.subscription.clone(),\n                        __deprecated_start_offset: None,\n                        __deprecated_stop_offset: None,\n                    }),\n                );\n            }\n            tracing::debug!(\n                \"Filled adaptive splits for GooglePubsub source, {} splits in total\",\n                new_splits.len()\n            );\n            Ok(new_splits)\n        }\n        _ => Err(ConnectorError::from(anyhow::anyhow!(\n            \"Unsupported split type for adaptive splits: {:?}\",\n            split_template\n        ))),\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n    use crate::source::SplitMetaData;\n    use crate::source::nats::split::NatsOffset;\n\n    #[test]\n    fn test_fill_adaptive_split_pubsub() {\n        let template = SplitImpl::GooglePubsub(PubsubSplit {\n            index: 0,\n            subscription: \"projects/p/subscriptions/s\".to_owned(),\n            __deprecated_start_offset: None,","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/source/util.rs#L49-L85","documentation":"fill_adaptive_split redistributes splits across actors for sources that support adaptive split assignment (currently only Google Pub/Sub style split templates). Any other SplitImpl variant falls into the catch-all arm and returns this error, because adaptive rescaling cannot interpret that split type.","triggerScenarios":"Calling fill_adaptive_split (directly or via resolve_fragment_to_actor_splits/reassign_splits) with a split template from a connector without adaptive-split support, e.g. Kafka, Kinesis, or NATS splits passed to the adaptive path.","commonSituations":"Fragment/actor rescaling code wired to a source whose SplitImpl variant is not the adaptive-supported one; adding a new connector and forgetting to either support or exclude it from adaptive splitting; unit tests like test_fill_adaptive_split_unsupported exercising the error path.","solutions":["Only call fill_adaptive_split for sources whose SplitImpl supports adaptive splits (e.g. GooglePubsub)","Route other connectors through their normal static split assignment path","Add a match arm implementing adaptive splitting if the new connector supports it"],"exampleFix":"// before\nfill_adaptive_split(&split_template, &fragment_id, &actor_ids)?; // split_template is a Kafka split\n// after\nif split_template.is_adaptive_supported() { fill_adaptive_split(...) } else { assign_static_splits(...) }","handlingStrategy":"type-guard","validationCode":"const adaptiveSplitSources = ['GooglePubsub'];\nfunction supportsAdaptiveSplits(splitType) { return adaptiveSplitSources.includes(splitType); }","typeGuard":"const isAdaptiveSplit = (s) => s.type === 'GooglePubsub' || s.type === 'Pubsub';","tryCatchPattern":"match fill_adaptive_split(tpl, fid, actors) { Err(e) if String(e).contains(\"Unsupported split type\") => assign_static_splits(tpl, actors), r => r }","preventionTips":["Call fill_adaptive_split only for Pub/Sub-like split templates","Keep a registry of which connectors support adaptive splits","Add explicit match arms when onboarding new connectors"],"tags":["split-assignment","unsupported","scaling"],"backgroundTag":"unsupported-operation","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"}