mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
add the version to the index-scheduler snapshots + fix a bug when opening an index scheduler for the first time
This commit is contained in:
parent
b9e9fc376a
commit
7eb23f73ba
4 changed files with 23 additions and 2 deletions
|
@ -54,8 +54,15 @@ impl Versioning {
|
|||
let to = (bin_major, bin_minor, bin_patch);
|
||||
|
||||
if from != to {
|
||||
upgrade_index_scheduler(env, from, to)?;
|
||||
upgrade_index_scheduler(env, &this, from, to)?;
|
||||
}
|
||||
|
||||
// Once we reach this point it means the upgrade process, if there was one is entirely finished
|
||||
// we can safely say we reached the latest version of the index scheduler
|
||||
let mut wtxn = env.write_txn()?;
|
||||
this.set_current_version(&mut wtxn)?;
|
||||
wtxn.commit()?;
|
||||
|
||||
Ok(this)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue