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::{
milli,
milli::progress::{Progress, VariableNameStep},
};
use meilisearch_types::milli;
use meilisearch_types::milli::progress::{Progress, VariableNameStep};
use crate::{processing::UpgradeDatabaseProgress, Error, IndexScheduler, Result};
use crate::processing::UpgradeDatabaseProgress;
use crate::{Error, IndexScheduler, Result};
impl IndexScheduler {
pub(super) fn process_upgrade(&self, progress: Progress) -> Result<()> {

View File

@ -10,9 +10,8 @@ use meilisearch_types::tasks::KindWithContent;
use roaring::RoaringBitmap;
use crate::insta_snapshot::snapshot_index_scheduler;
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;
#[test]

View File

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

View File

@ -1,13 +1,13 @@
mod v1_12;
use std::path::Path;
use std::{fs, io};
use meili_snap::snapshot;
use meilisearch::Opt;
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<()> {
fs::create_dir_all(&dst)?;
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 meilisearch::Opt;
use crate::{
common::{default_settings, Server, Value},
json,
upgrade::copy_dir_all,
};
use crate::common::{default_settings, Server, Value};
use crate::json;
use crate::upgrade::copy_dir_all;
#[actix_rt::test]
async fn import_v1_12_0() {

View File

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

View File

@ -1,8 +1,7 @@
use heed::RwTxn;
use crate::{make_enum_progress, Result};
use crate::{progress::Progress, Index};
use crate::progress::Progress;
use crate::{make_enum_progress, Index, Result};
// 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(