{"record":{"id":"a71b6a9059b622d5","repo":"risingwavelabs/risingwave","slug":"cannot-alter-the-job-because-its-creating-backf","errorCode":null,"errorMessage":"Cannot alter the job {} because its creating backfill contains a scan type that does not support online rescheduling","messagePattern":"Cannot alter the job (.+?) because its creating backfill contains a scan type that does not support online rescheduling","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/meta/src/stream/stream_manager.rs","lineNumber":978,"sourceCode":"    pub(crate) async fn reschedule_streaming_job_backfill_parallelism(\n        &self,\n        job_id: JobId,\n        parallelism: Option<ParallelismPolicy>,\n        deferred: bool,\n    ) -> MetaResult<()> {\n        let _reschedule_job_lock = self.reschedule_lock_write_guard().await;\n\n        if !deferred {\n            let creating_jobs = self.metadata_manager.list_creating_jobs().await?;\n\n            if !creating_jobs.is_empty() {\n                let jobs_with_unreschedulable_scan = self\n                    .metadata_manager\n                    .collect_online_unreschedulable_backfill_jobs(&creating_jobs)\n                    .await?;\n\n                if jobs_with_unreschedulable_scan.contains(&job_id) {\n                    bail!(\n                        \"Cannot alter the job {} because its creating backfill contains a scan type that does not support online rescheduling\",\n                        job_id,\n                    );\n                }\n            }\n        }\n\n        let commands = self\n            .scale_controller\n            .reschedule_backfill_parallelism_inplace(HashMap::from([(job_id, parallelism)]))\n            .await?;\n\n        if !deferred {\n            let _source_pause_guard = self.source_manager.pause_tick().await;\n\n            for (database_id, command) in commands {\n                self.barrier_scheduler\n                    .run_command(database_id, command)","sourceCodeStart":960,"sourceCodeEnd":996,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/stream/stream_manager.rs#L960-L996","documentation":"During online rescheduling of a creating backfill job's parallelism, the meta node checks collect_online_unreschedulable_backfill_jobs for scan-type backfills that do not support online rescheduling (e.g. certain scan-based backfill strategies). If the job appears there, the parallelism change is rejected.","triggerScenarios":"Calling reschedule_streaming_job_backfill_parallelism on a CREATING job whose backfill performs a scan type flagged as not online-reschedulable; the job_id is found in jobs_with_unreschedulable_scan.","commonSituations":"Altering parallelism of a MV/backfill using a scan-based backfill (e.g. table scan backfill without online reschedule support); scheduler/autoscaler adjusting worker counts while such backfills run; version-dependent behavior where older backfill plans lack reschedule metadata.","solutions":["Wait for the backfill to complete, then change parallelism normally.","Recreate the job with the target parallelism so no online reschedule is needed.","Use a backfill mode that supports online rescheduling if mid-creation scaling is a requirement."],"exampleFix":"// before: ALTER ... SET PARALLELISM while scan-type backfill is creating -> error\n// after\n-- wait until backfill done, then:\nALTER MATERIALIZED VIEW mv SET PARALLELISM = 8;","handlingStrategy":"try-catch","validationCode":"-- avoid altering parallelism while a scan-type backfill is still creating\nSELECT state FROM rw_streaming_jobs WHERE job_id = <id> AND state = 'Created';","typeGuard":null,"tryCatchPattern":"match alter_parallelism(id, n).await {\n    Err(e) if e.to_string().contains(\"does not support online rescheduling\") => {\n        // defer until backfill completes\n        on_backfill_complete(id, move || alter_parallelism(id, n)).await\n    }\n    other => other,\n}","preventionTips":["Queue parallelism changes until backfill jobs finish.","Prefer recreating scan-backfill jobs at the desired parallelism.","Track which backfill scan types in your deployment are online-reschedulable.","Gate autoscalers so they do not reschedule creating backfill jobs."],"tags":["meta-node","backfill","parallelism","scan"],"backgroundTag":"invalid-state-transition","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"}