diff --git a/src/meta/model_v2/migration/src/m20240820_081248_add_time_travel_per_table_epoch.rs b/src/meta/model_v2/migration/src/m20240820_081248_add_time_travel_per_table_epoch.rs index 6776f2a3baf85..17ad55a99c5a0 100644 --- a/src/meta/model_v2/migration/src/m20240820_081248_add_time_travel_per_table_epoch.rs +++ b/src/meta/model_v2/migration/src/m20240820_081248_add_time_travel_per_table_epoch.rs @@ -25,11 +25,7 @@ impl MigrationTrait for Migration { .get_connection() .execute(sea_orm::Statement::from_string( sea_orm::DatabaseBackend::MySql, - format!( - "ALTER TABLE {TABLE_NAME} - DROP PRIMARY KEY, - ADD PRIMARY KEY (epoch, table_id)" - ), + format!("ALTER TABLE {TABLE_NAME} DROP PRIMARY KEY, ADD PRIMARY KEY (epoch, table_id)"), )) .await?; } @@ -148,9 +144,7 @@ impl MigrationTrait for Migration { .get_connection() .execute(sea_orm::Statement::from_string( sea_orm::DatabaseBackend::Postgres, - format!( - "ALTER TABLE {TABLE_NAME} ADD PRIMARY KEY (epoch)" - ), + format!("ALTER TABLE {TABLE_NAME} ADD PRIMARY KEY (epoch)"), )) .await?; } diff --git a/src/meta/src/hummock/manager/time_travel.rs b/src/meta/src/hummock/manager/time_travel.rs index 7b3bd1e5c4598..0b6ef73e52605 100644 --- a/src/meta/src/hummock/manager/time_travel.rs +++ b/src/meta/src/hummock/manager/time_travel.rs @@ -286,10 +286,7 @@ impl HummockManager { let epoch_to_version = hummock_epoch_to_version::Entity::find() .filter( Condition::any() - .add( - hummock_epoch_to_version::Column::TableId - .eq(i64::try_from(table_id).unwrap()), - ) + .add(hummock_epoch_to_version::Column::TableId.eq(i64::from(table_id))) // for backward compatibility .add(hummock_epoch_to_version::Column::TableId.eq(0)), ) @@ -422,7 +419,7 @@ impl HummockManager { let version_id: u64 = delta.id.to_u64(); let m = hummock_epoch_to_version::ActiveModel { epoch: Set(committed_epoch.try_into().unwrap()), - table_id: Set(table_id.table_id.try_into().unwrap()), + table_id: Set(table_id.table_id.into()), version_id: Set(version_id.try_into().unwrap()), }; // There should be no conflict rows.