update the version of arroy

This commit is contained in:
Tamo 2024-10-29 03:27:26 +01:00
parent a9b61c8434
commit 690eb42fc0
3 changed files with 16 additions and 7 deletions

4
Cargo.lock generated
View File

@ -407,7 +407,7 @@ dependencies = [
[[package]] [[package]]
name = "arroy" name = "arroy"
version = "0.5.0" version = "0.5.0"
source = "git+https://github.com/meilisearch/arroy/?rev=3908c9e#3908c9edfba77ba18cc50bda41c88166ba5ebd37" source = "git+https://github.com/meilisearch/arroy/?rev=32670e7dd8b93640fcb53261ace89bda1c06497b#32670e7dd8b93640fcb53261ace89bda1c06497b"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"byteorder", "byteorder",
@ -3536,7 +3536,7 @@ name = "meilitool"
version = "1.11.0" version = "1.11.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"arroy 0.5.0 (git+https://github.com/meilisearch/arroy/?rev=3908c9e)", "arroy 0.5.0 (git+https://github.com/meilisearch/arroy/?rev=32670e7dd8b93640fcb53261ace89bda1c06497b)",
"clap", "clap",
"dump", "dump",
"file-store", "file-store",

View File

@ -18,5 +18,4 @@ meilisearch-types = { path = "../meilisearch-types" }
serde = { version = "1.0.209", features = ["derive"] } serde = { version = "1.0.209", features = ["derive"] }
time = { version = "0.3.36", features = ["formatting"] } time = { version = "0.3.36", features = ["formatting"] }
uuid = { version = "1.10.0", features = ["v4"], default-features = false } uuid = { version = "1.10.0", features = ["v4"], default-features = false }
arroy_v04_to_v05 = { package = "arroy", git = "https://github.com/meilisearch/arroy/", rev = "3908c9e" } arroy_v04_to_v05 = { package = "arroy", git = "https://github.com/meilisearch/arroy/", rev = "32670e7dd8b93640fcb53261ace89bda1c06497b" }

View File

@ -57,6 +57,10 @@ pub fn v1_10_to_v1_11(db_path: &Path) -> anyhow::Result<()> {
index_path.display() index_path.display()
) )
})?; })?;
let index_read_database =
try_opening_poly_database(&index_env, &index_rtxn, db_name::VECTOR_ARROY)
.with_context(|| format!("while updating date format for index `{uid}`"))?;
let mut index_wtxn = index_env.write_txn().with_context(|| { let mut index_wtxn = index_env.write_txn().with_context(|| {
format!( format!(
"while obtaining a write transaction for index {uid} at {}", "while obtaining a write transaction for index {uid} at {}",
@ -64,10 +68,16 @@ pub fn v1_10_to_v1_11(db_path: &Path) -> anyhow::Result<()> {
) )
})?; })?;
let database = try_opening_poly_database(&index_env, &index_rtxn, db_name::VECTOR_ARROY) let index_write_database =
.with_context(|| format!("while updating date format for index `{uid}`"))?; try_opening_poly_database(&index_env, &index_wtxn, db_name::VECTOR_ARROY)
.with_context(|| format!("while updating date format for index `{uid}`"))?;
arroy_v04_to_v05::ugrade_from_prev_version(&index_rtxn, &mut index_wtxn, database)?; arroy_v04_to_v05::ugrade_from_prev_version(
&index_rtxn,
index_read_database,
&mut index_wtxn,
index_write_database,
)?;
index_wtxn.commit()?; index_wtxn.commit()?;
} }