mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-02-27 04:31:33 +01:00
Merge #5360
5360: Fix the dumpless upgrade log r=Kerollmops a=Kerollmops This PR fixes a dump less upgrade log issue where the current and target version was the same value and therefore displayed invalid logs like: _upgrading from v1.12.8 to v1.12.8_. Co-authored-by: Kerollmops <clement@meilisearch.com>
This commit is contained in:
commit
ceec68cf7a
@ -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()?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user