{"record":{"id":"3568bbe8e177ace8","repo":"risingwavelabs/risingwave","slug":"since-timestamp-is-not-before-the-committed-epoch","errorCode":null,"errorMessage":"since_timestamp is not before the committed epoch of upstream table {}: requested epoch {}, committed epoch {}","messagePattern":"since_timestamp is not before the committed epoch of upstream table (.+?): requested epoch (.+?), committed epoch (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/meta/src/barrier/context/context_impl.rs","lineNumber":87,"sourceCode":"    let Some(first_log) = change_log.first() else {\n        return Err(anyhow::anyhow!(\n            \"empty table changelog found for upstream table {} when resolving since_timestamp\",\n            table_id\n        )\n        .into());\n    };\n    let first_checkpoint_epoch = first_log.checkpoint_epoch;\n    if since_epoch < first_checkpoint_epoch {\n        return Err(anyhow::anyhow!(\n            \"since_timestamp is earlier than the retained changelog of upstream table {}: requested epoch {}, first retained checkpoint epoch {}\",\n            table_id,\n            since_epoch,\n            first_checkpoint_epoch,\n        )\n        .into());\n    }\n    if since_epoch >= upstream_committed_epoch {\n        return Err(anyhow::anyhow!(\n            \"since_timestamp is not before the committed epoch of upstream table {}: requested epoch {}, committed epoch {}\",\n            table_id,\n            since_epoch,\n            upstream_committed_epoch,\n        )\n        .into());\n    }\n    let latest_log = change_log.last().expect(\"checked non-empty\");\n    if upstream_committed_epoch != latest_log.checkpoint_epoch {\n        return Err(anyhow::anyhow!(\n            \"upstream committed epoch {} does not match latest changelog epoch {} for upstream table {}\",\n            upstream_committed_epoch,\n            latest_log.checkpoint_epoch,\n            table_id,\n        )\n        .into());\n    }\n","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/barrier/context/context_impl.rs#L69-L105","documentation":"The requested since_timestamp is at or after the upstream table's committed epoch, meaning there is no committed history strictly before the requested point to snapshot against. The since epoch must fall strictly between the first retained checkpoint and the committed epoch.","triggerScenarios":"resolve_since_timestamp_log_store_epoch with since_epoch >= upstream_committed_epoch — e.g. a since timestamp computed after the upstream table's latest commit.","commonSituations":"Clock skew or wrong timestamp conversion (future timestamp supplied); upstream table already fully committed before backfill creation; passing 'now' while committed epoch is derived from a later barrier.","solutions":["Supply a since_timestamp earlier than the upstream table's latest committed epoch","Fix timestamp conversion/timezone so the epoch is in the correct range","Retry with a slightly earlier since_timestamp"],"exampleFix":"-- before\nSINCE_TIMESTAMP = now();\n-- after\nSINCE_TIMESTAMP = now() - interval '1 minute';","handlingStrategy":"validation","validationCode":"if since_epoch >= upstream_committed_epoch {\n    return Err(\"since_timestamp must be strictly before the upstream committed epoch\");\n}","typeGuard":"fn strictly_before_committed(since: u64, committed: u64) -> bool { since < committed }","tryCatchPattern":"match create_snapshot_backfill(...).await {\n    Err(e) if e.contains(\"not before the committed epoch\") => use_earlier_timestamp(),\n    other => other,\n}","preventionTips":["Use timestamps safely in the past relative to upstream commits","Check clock skew / timezone in timestamp-to-epoch conversion","Validate the range client-side before creating the job"],"tags":["meta","barrier","since-timestamp","validation"],"backgroundTag":"argument-out-of-range","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"}