Use the new arroy upgrade method to move from 0.4 to 0.5

This commit is contained in:
Kerollmops 2025-03-11 14:52:46 +01:00
parent 3bc62f0549
commit 1d499ed9b2
No known key found for this signature in database
GPG Key ID: F250A4C4E3AE5F5F
6 changed files with 11 additions and 7 deletions

View File

@ -240,9 +240,12 @@ impl IndexScheduler {
}; };
let env = unsafe { let env = unsafe {
let options = heed::EnvOpenOptions::new(); let env_options = heed::EnvOpenOptions::new();
let mut options = options.read_txn_without_tls(); let mut env_options = env_options.read_txn_without_tls();
options.max_dbs(Self::nb_db()).map_size(budget.task_db_size).open(&options.tasks_path) env_options
.max_dbs(Self::nb_db())
.map_size(budget.task_db_size)
.open(&options.tasks_path)
}?; }?;
// We **must** starts by upgrading the version because it'll also upgrade the required database before we can open them // We **must** starts by upgrading the version because it'll also upgrade the required database before we can open them

View File

@ -1,5 +1,5 @@
use anyhow::bail; use anyhow::bail;
use meilisearch_types::heed::{Env, RwTxn, WithTls, WithoutTls}; use meilisearch_types::heed::{Env, RwTxn, WithoutTls};
use meilisearch_types::tasks::{Details, KindWithContent, Status, Task}; use meilisearch_types::tasks::{Details, KindWithContent, Status, Task};
use meilisearch_types::versioning::{VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH}; use meilisearch_types::versioning::{VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH};
use time::OffsetDateTime; use time::OffsetDateTime;

View File

@ -10,7 +10,6 @@ license.workspace = true
[dependencies] [dependencies]
anyhow = "1.0.95" anyhow = "1.0.95"
arroy_v04_to_v05 = { package = "arroy", git = "https://github.com/meilisearch/arroy/", tag = "DO-NOT-DELETE-upgrade-v04-to-v05" }
clap = { version = "4.5.24", features = ["derive"] } clap = { version = "4.5.24", features = ["derive"] }
dump = { path = "../dump" } dump = { path = "../dump" }
file-store = { path = "../file-store" } file-store = { path = "../file-store" }

View File

@ -76,7 +76,7 @@ pub fn v1_10_to_v1_11(
try_opening_poly_database(&index_env, &index_wtxn, db_name::VECTOR_ARROY) try_opening_poly_database(&index_env, &index_wtxn, db_name::VECTOR_ARROY)
.with_context(|| format!("while updating date format for index `{uid}`"))?; .with_context(|| format!("while updating date format for index `{uid}`"))?;
arroy_v04_to_v05::ugrade_from_prev_version( meilisearch_types::milli::arroy::upgrade::cosine_from_0_4_to_0_5(
&index_rtxn, &index_rtxn,
index_read_database, index_read_database,
&mut index_wtxn, &mut index_wtxn,

View File

@ -32,7 +32,7 @@ grenad = { version = "0.5.0", default-features = false, features = [
"rayon", "rayon",
"tempfile", "tempfile",
] } ] }
heed = { version = "0.22.0", branch = "bump-versions", git = "https://github.com/meilisearch/heed", default-features = false, features = [ heed = { version = "0.22.0", branch = "main", git = "https://github.com/meilisearch/heed", default-features = false, features = [
"serde-json", "serde-json",
"serde-bincode", "serde-bincode",
] } ] }

View File

@ -83,6 +83,8 @@ pub use self::search::{
}; };
pub use self::update::ChannelCongestion; pub use self::update::ChannelCongestion;
pub use arroy;
pub type Result<T> = std::result::Result<T, error::Error>; pub type Result<T> = std::result::Result<T, error::Error>;
pub type Attribute = u32; pub type Attribute = u32;