{"record":{"id":"1cf940b19d3633e1","repo":"risingwavelabs/risingwave","slug":"no-table-changelog-found-for-upstream-table-whe","errorCode":null,"errorMessage":"no table changelog found for upstream table {} when resolving since_timestamp","messagePattern":"no table changelog found for upstream table (.+?) when resolving since_timestamp","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/meta/src/barrier/context/context_impl.rs","lineNumber":64,"sourceCode":"    BarrierManagerStatus, BarrierWorkerRuntimeInfoSnapshot, BatchRefreshInfo, Command,\n    CreateStreamingJobCommandInfo, CreateStreamingJobType, DatabaseRuntimeInfoSnapshot,\n    RecoveryReason, ReplaceStreamJobPlan, Scheduled,\n};\nuse crate::hummock::CommitEpochInfo;\nuse crate::manager::LocalNotification;\nuse crate::model::FragmentDownstreamRelation;\nuse crate::serving::{fetch_serving_infos, sync_serving_table_vnode_mappings_to_hummock};\nuse crate::stream::{SourceChange, cleanup_dropped_streaming_jobs};\nuse crate::{MetaError, MetaResult};\n\nfn resolve_since_timestamp_log_store_epoch(\n    table_id: TableId,\n    since_epoch: u64,\n    upstream_committed_epoch: u64,\n    table_change_log: &TableChangeLogs,\n) -> MetaResult<SinceTimestampResolvedEpoch> {\n    let change_log = table_change_log.get(&table_id).ok_or_else(|| {\n        anyhow::anyhow!(\n            \"no table changelog found for upstream table {} when resolving since_timestamp\",\n            table_id\n        )\n    })?;\n    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,","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/barrier/context/context_impl.rs#L46-L82","documentation":"When resolving a since_timestamp into a concrete log-store epoch for a snapshot backfill, the upstream table's change log entry is missing entirely from TableChangeLogs. The resolver needs at least one changelog entry to map the since epoch to a snapshot checkpoint epoch.","triggerScenarios":"Calling resolve_since_timestamp_log_store_epoch (via resolve_log_store_epoch during barrier creation for a snapshot backfill) with a table_id absent from table_change_log.","commonSituations":"Upstream table changelog not yet registered in the barrier state; upstream MV/table created but no changelog collected yet; internal state inconsistency after recovery.","solutions":["Ensure the upstream table's changelog is registered before creating the snapshot backfill","Retry after the next barrier collects change logs","Verify the upstream table id is correct","Report as a bug if the table clearly has changelogs"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if table_change_log.get(&table_id).is_none() {\n    return Err(\"upstream changelog not registered yet\");\n}","typeGuard":"fn has_changelog(logs: &TableChangeLogs, id: &TableId) -> bool {\n    logs.contains_key(id)\n}","tryCatchPattern":"match create_snapshot_backfill(...).await {\n    Err(e) if e.contains(\"no table changelog found\") => retry_after_next_barrier(),\n    other => other,\n}","preventionTips":["Wait for upstream changelog registration before backfill creation","Retry on the next barrier","Verify upstream table id correctness"],"tags":["meta","barrier","changelog","since-timestamp"],"backgroundTag":"entity-not-found","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"}