{"record":{"id":"d549b6bf88ba9c54","repo":"risingwavelabs/risingwave","slug":"cannot-create-streaming-job-with-snapshot-backfill","errorCode":null,"errorMessage":"cannot create streaming job with snapshot backfill when paused","messagePattern":"cannot create streaming job with snapshot backfill when paused","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/meta/src/barrier/checkpoint/control.rs","lineNumber":1316,"sourceCode":"            // skip the command when there is nothing to do with the barrier\n            if let Some(notifier) = notifier_start {\n                notifier.started();\n            }\n            return Ok(());\n        };\n\n        if let Some(Command::CreateStreamingJob {\n            job_type:\n                CreateStreamingJobType::SnapshotBackfill { .. }\n                | CreateStreamingJobType::BatchRefresh(_),\n            ..\n        }) = &command\n            && self.state.is_paused()\n        {\n            warn!(\"cannot create streaming job with snapshot backfill when paused\");\n            if let Some(notifier) = notifier_start {\n                notifier.notify_start_failed(\n                    anyhow!(\"cannot create streaming job with snapshot backfill when paused\",)\n                        .into(),\n                );\n            }\n            return Ok(());\n        }\n\n        let barrier_info = self.state.next_barrier_info(checkpoint, curr_epoch);\n        // Tracing related stuff\n        barrier_info.prev_epoch.span().in_scope(|| {\n            tracing::info!(target: \"rw_tracing\", epoch = barrier_info.curr_epoch(), \"new barrier enqueued\");\n        });\n        span.record(\"epoch\", barrier_info.curr_epoch());\n\n        let epoch = barrier_info.epoch();\n        let ApplyCommandInfo { jobs_to_wait } = match self.apply_command(\n            command,\n            &mut notifier_start,\n            barrier_info,","sourceCodeStart":1298,"sourceCodeEnd":1334,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/barrier/checkpoint/control.rs#L1298-L1334","documentation":"The barrier controller refuses to start a streaming job that requires a snapshot backfill while the cluster is paused, because snapshot backfill depends on barrier progress. The job start is failed via the notifier and barrier processing continues.","triggerScenarios":"Submitting CREATE MATERIALIZED VIEW / streaming job with snapshot backfill while the cluster is in a paused state (e.g. paused for ALTER, migration, or manual pause command), detected in handle_new_barrier.","commonSituations":"Cluster paused for planned maintenance or upgrade while DDL was queued; automation issuing CREATE statements during a paused window.","solutions":["Resume the cluster (e.g. ALTER SYSTEM RESUME) and retry the CREATE.","Delay the DDL until after the pause window completes.","If the job does not need snapshot backfill, create it without snapshot backfill."],"exampleFix":"-- before\nCREATE MATERIALIZED VIEW mv AS SELECT * FROM t; -- fails while paused\n-- after\nALTER SYSTEM RESUME;\nCREATE MATERIALIZED VIEW mv AS SELECT * FROM t;","handlingStrategy":"validation","validationCode":"-- ensure cluster is not paused before snapshot-backfill DDL\nSELECT value FROM system_parameter WHERE name = 'barrier_interval_ms'; -- plus\nSHOW PROCESSLIST; -- check for paused state / use rw_catalog pause status before CREATE","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Resume the cluster before running snapshot-backfill DDL.","Gate automation so CREATE jobs are not issued during maintenance pauses.","Monitor cluster pause state in deployment pipelines before DDL steps."],"tags":["barrier","paused-cluster","backfill","ddl"],"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"}