This commit is contained in:
Tamo 2025-01-21 16:41:16 +01:00 committed by Louis Dureuil
parent 1eb9fe8562
commit 41eeffd88d
No known key found for this signature in database
7 changed files with 18 additions and 25 deletions

View File

@ -1,9 +1,8 @@
use meilisearch_types::{ use meilisearch_types::milli;
milli, use meilisearch_types::milli::progress::{Progress, VariableNameStep};
milli::progress::{Progress, VariableNameStep},
};
use crate::{processing::UpgradeDatabaseProgress, Error, IndexScheduler, Result}; use crate::processing::UpgradeDatabaseProgress;
use crate::{Error, IndexScheduler, Result};
impl IndexScheduler { impl IndexScheduler {
pub(super) fn process_upgrade(&self, progress: Progress) -> Result<()> { pub(super) fn process_upgrade(&self, progress: Progress) -> Result<()> {

View File

@ -10,9 +10,8 @@ use meilisearch_types::tasks::KindWithContent;
use roaring::RoaringBitmap; use roaring::RoaringBitmap;
use crate::insta_snapshot::snapshot_index_scheduler; use crate::insta_snapshot::snapshot_index_scheduler;
use crate::test_utils::Breakpoint;
use crate::test_utils::Breakpoint::*; use crate::test_utils::Breakpoint::*;
use crate::test_utils::{index_creation_task, read_json, FailureLocation}; use crate::test_utils::{index_creation_task, read_json, Breakpoint, FailureLocation};
use crate::IndexScheduler; use crate::IndexScheduler;
#[test] #[test]

View File

@ -1,11 +1,9 @@
use std::path::Path; use std::path::Path;
use anyhow::bail; use anyhow::bail;
use meilisearch_types::{ use meilisearch_types::heed;
heed, use meilisearch_types::tasks::{KindWithContent, Status, Task};
tasks::{KindWithContent, Status, Task}, use meilisearch_types::versioning::{VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH};
versioning::{VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH},
};
use time::OffsetDateTime; use time::OffsetDateTime;
use tracing::info; use tracing::info;

View File

@ -1,13 +1,13 @@
mod v1_12; mod v1_12;
use std::path::Path;
use std::{fs, io};
use meili_snap::snapshot; use meili_snap::snapshot;
use meilisearch::Opt; use meilisearch::Opt;
use crate::common::{default_settings, Server}; use crate::common::{default_settings, Server};
use std::path::Path;
use std::{fs, io};
fn copy_dir_all(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> io::Result<()> { fn copy_dir_all(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> io::Result<()> {
fs::create_dir_all(&dst)?; fs::create_dir_all(&dst)?;
for entry in fs::read_dir(src)? { for entry in fs::read_dir(src)? {

View File

@ -6,11 +6,9 @@ use manifest_dir_macros::exist_relative_path;
use meili_snap::{json_string, snapshot}; use meili_snap::{json_string, snapshot};
use meilisearch::Opt; use meilisearch::Opt;
use crate::{ use crate::common::{default_settings, Server, Value};
common::{default_settings, Server, Value}, use crate::json;
json, use crate::upgrade::copy_dir_all;
upgrade::copy_dir_all,
};
#[actix_rt::test] #[actix_rt::test]
async fn import_v1_12_0() { async fn import_v1_12_0() {

View File

@ -1,5 +1,5 @@
use std::mem::size_of; use std::borrow::Cow;
use std::{borrow::Cow, mem::size_of_val}; use std::mem::{size_of, size_of_val};
use byteorder::{BigEndian, ByteOrder}; use byteorder::{BigEndian, ByteOrder};
use heed::{BoxedError, BytesDecode, BytesEncode}; use heed::{BoxedError, BytesDecode, BytesEncode};

View File

@ -1,8 +1,7 @@
use heed::RwTxn; use heed::RwTxn;
use crate::{make_enum_progress, Result}; use crate::progress::Progress;
use crate::{make_enum_progress, Index, Result};
use crate::{progress::Progress, Index};
// The field distribution was not computed correctly in the v1.12 until the v1.12.3 // The field distribution was not computed correctly in the v1.12 until the v1.12.3
pub(super) fn v1_12_to_v1_12_3( pub(super) fn v1_12_to_v1_12_3(