{"record":{"id":"974d3947f8cd02b3","repo":"risingwavelabs/risingwave","slug":"time-travel-version-expired-table-table-id-epo","errorCode":null,"errorMessage":"time-travel version expired: table {table_id}, epoch {epoch}","messagePattern":"time-travel version expired: table (.+?), epoch (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/meta/src/hummock/error.rs","lineNumber":52,"sourceCode":"        anyhow::Error,\n    ),\n    #[error(transparent)]\n    ObjectStore(\n        #[from]\n        #[backtrace]\n        ObjectError,\n    ),\n    #[error(\"compactor {0} is disconnected\")]\n    CompactorUnreachable(HummockContextId),\n    #[error(\"compaction group error: {0}\")]\n    CompactionGroup(String),\n    #[error(\"SST {0} is invalid\")]\n    InvalidSst(HummockSstableObjectId),\n    #[error(\"invalid manual compaction option: {0}\")]\n    InvalidManualCompactionOption(String),\n    #[error(\"invalid epoch range: {start_epoch}..={end_epoch}\")]\n    InvalidEpochRange { start_epoch: u64, end_epoch: u64 },\n    #[error(\"time-travel version expired: table {table_id}, epoch {epoch}\")]\n    TimeTravelVersionExpired { table_id: TableId, epoch: u64 },\n    #[error(\"time travel\")]\n    TimeTravel(\n        #[source]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(transparent)]\n    Internal(\n        #[from]\n        #[backtrace]\n        anyhow::Error,\n    ),\n}\n\nimpl Error {\n    pub fn retryable(&self) -> bool {\n        matches!(self, Error::MetaStore(_))","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/hummock/error.rs#L34-L70","documentation":"HummockMetaError::TimeTravelVersionExpired signals that a time-travel read requested a table version at an epoch that has already been marked expired and pruned. Hummock retains historical versions only up to the configured retention window; beyond it the version is no longer readable.","triggerScenarios":"Querying `AS OF` / time travel for (table_id, epoch) where epoch is older than the retention period (hummock time-travel version retention), or after the version was expired and cleaned by GC.","commonSituations":"Backfill or audit queries against old snapshots; retention period shortened in config so previously readable epochs expire; long-running query reusing a stale epoch handle; Iceberg-export/time-travel consumers reading beyond TTL.","solutions":["Increase the time-travel version retention/TTV retention config on the meta node and retry","Pick an epoch within the available retention window (check hummock version timelines via risectl)","Refresh the epoch to a recent snapshot instead of a stale one","Restore from backup/object store snapshot if the historical data is genuinely required"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"if let Some(available) = meta_client.time_travel_version(table_id, epoch)? {\n    if available.is_expired() { /* pick a newer epoch instead */ }\n}\n","typeGuard":"fn version_expired(err: &HummockMetaError) -> Option<(TableId, u64)> {\n    if let HummockMetaError::TimeTravelVersionExpired { table_id, epoch } = err { Some((*table_id, *epoch)) } else { None }\n}\n","tryCatchPattern":"match read_as_of(table_id, epoch).await {\n    Err(HummockMetaError::TimeTravelVersionExpired { .. }) => {\n        eprintln!(\"version expired; reading latest snapshot instead\");\n        read_latest(table_id).await\n    }\n    other => other,\n}\n","preventionTips":["Configure sufficient time-travel version retention for your workload","Resolve epochs close to query time, not long in advance","Check version availability before long-running time-travel jobs","Alert when retention approaches the oldest epoch consumers need"],"tags":["rust","hummock","time-travel","gc","retention"],"backgroundTag":"resource-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"}