{"record":{"id":"3d3a28b43cc8a378","repo":"risingwavelabs/risingwave","slug":"missing-lagging-barriers-for-direct-log-store-star","errorCode":null,"errorMessage":"missing lagging barriers for direct log-store start from snapshot epoch {}","messagePattern":"missing lagging barriers for direct log-store start from snapshot epoch (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/meta/src/barrier/checkpoint/independent_job/creating_job/mod.rs","lineNumber":558,"sourceCode":"                    BarrierInfo {\n                        prev_epoch: TracedEpoch::new(Epoch(prev_epoch)),\n                        curr_epoch: TracedEpoch::new(Epoch(pending_barrier.curr_epoch())),\n                        kind: if pending_barrier.kind.is_checkpoint() {\n                            BarrierKind::Checkpoint(take(&mut pending_non_checkpoint_barriers))\n                        } else {\n                            BarrierKind::Barrier\n                        },\n                    },\n                );\n                prev_epoch = pending_barrier.curr_epoch();\n            }\n            assert_eq!(\n                new_upstream_barrier_prev_epoch, prev_epoch,\n                \"new upstream barrier prev epoch should match the latest pending log-store epoch\"\n            );\n        }\n        let Some(initial_barrier) = initial_barrier else {\n            return Err(anyhow::anyhow!(\n                \"missing lagging barriers for direct log-store start from snapshot epoch {}\",\n                snapshot_epoch\n            )\n            .into());\n        };\n        assert!(initial_barrier.kind.is_checkpoint());\n        Ok((initial_barrier, barriers))\n    }\n\n    fn recover_consuming_snapshot(\n        job_id: JobId,\n        upstream_table_log_epochs: &UpstreamTableLogEpochs,\n        snapshot_epoch: u64,\n        committed_epoch: u64,\n        upstream_barrier_info: &BarrierInfo,\n        info: CreatingJobInfo,\n        backfill_order_state: BackfillOrderState,\n        version_stat: &HummockVersionStats,","sourceCodeStart":540,"sourceCodeEnd":576,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/barrier/checkpoint/independent_job/creating_job/mod.rs#L540-L576","documentation":"For a creating job that reads directly from the log store starting at a snapshot epoch, the code must find the lagging barriers covering the gap from the snapshot epoch; if the search loop ends without collecting any initial barrier, it errors, since it cannot establish the correct starting log epochs.","triggerScenarios":"Creating a streaming job with direct log-store read starting from a snapshot epoch when no lagging checkpoint barrier at/preceding that snapshot epoch is available in the pending barrier set (resolve_since_timestamp_upstream_log_epochs).","commonSituations":"Upstream barriers not yet checkpointed past the snapshot epoch; race between snapshot creation and barrier arrival; bug or truncation in log-store epoch metadata.","solutions":["Retry the CREATE; ensure upstream checkpoints have progressed past the snapshot epoch.","Verify the upstream source/table is producing checkpoint barriers (check barrier lag metrics).","If reproducible, gather the snapshot_epoch from the message and file a bug — barrier bookkeeping is inconsistent."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if let Err(e) = create_job_result {\n    if e.to_string().contains(\"missing lagging barriers\") {\n        // wait for upstream checkpoints to progress, then retry CREATE\n    }\n}","preventionTips":["Ensure upstream sources/tables are actively checkpointing before direct log-store starts.","Monitor barrier lag; avoid creating jobs during barrier stalls.","Retry the CREATE once upstream checkpoint epoch passes the snapshot epoch."],"tags":["barrier","log-store","backfill","epoch","internal-invariant"],"backgroundTag":"empty-result-set","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"}