From 116bf888d36337cd0cbce5c85b4ab947c0d60e30 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 07:38:52 +0000 Subject: [PATCH] fix(meta): fix time travel metadata for partial checkpoint (#18160) (#18162) Co-authored-by: zwang28 <70626450+zwang28@users.noreply.github.com> --- src/meta/src/hummock/manager/time_travel.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/meta/src/hummock/manager/time_travel.rs b/src/meta/src/hummock/manager/time_travel.rs index 142c48e9bc0f2..61c1e820fab0c 100644 --- a/src/meta/src/hummock/manager/time_travel.rs +++ b/src/meta/src/hummock/manager/time_travel.rs @@ -397,9 +397,13 @@ impl HummockManager { hummock_epoch_to_version::Entity::insert(m) .on_conflict( OnConflict::column(hummock_epoch_to_version::Column::Epoch) - .update_columns([hummock_epoch_to_version::Column::VersionId]) + // The existing row must be inserted by the common committed epoch of created MVs. + // While any duplicate row must be inserted by MVs still in creation. + // So the row shouldn't be updated. + .do_nothing() .to_owned(), ) + .do_nothing() .exec(txn) .await?; let mut version_sst_ids = None;