Fix the dumpless upgrade log

This commit is contained in:
Kerollmops 2025-02-20 13:48:49 +01:00
parent 52b8abadf4
commit 834995b293
No known key found for this signature in database
GPG Key ID: F250A4C4E3AE5F5F

View File

@ -46,20 +46,19 @@ pub fn upgrade_index_scheduler(
} }
}; };
let mut current_version = from;
info!("Upgrading the task queue"); info!("Upgrading the task queue");
let mut local_from = from;
for upgrade in upgrade_functions[start..].iter() { for upgrade in upgrade_functions[start..].iter() {
let target = upgrade.target_version(); let target = upgrade.target_version();
info!( info!(
"Upgrading from v{}.{}.{} to v{}.{}.{}", "Upgrading from v{}.{}.{} to v{}.{}.{}",
from.0, from.1, from.2, current_version.0, current_version.1, current_version.2 local_from.0, local_from.1, local_from.2, target.0, target.1, target.2
); );
let mut wtxn = env.write_txn()?; let mut wtxn = env.write_txn()?;
upgrade.upgrade(env, &mut wtxn, from)?; upgrade.upgrade(env, &mut wtxn, local_from)?;
versioning.set_version(&mut wtxn, target)?; versioning.set_version(&mut wtxn, target)?;
wtxn.commit()?; wtxn.commit()?;
current_version = target; local_from = target;
} }
let mut wtxn = env.write_txn()?; let mut wtxn = env.write_txn()?;