mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-15 07:47:30 +01:00
fix bugs after rebase
This commit is contained in:
parent
381b2f1504
commit
bba3ae934b
@ -3,7 +3,7 @@ use std::fmt::Display;
|
|||||||
use meilisearch_types::batches::BatchId;
|
use meilisearch_types::batches::BatchId;
|
||||||
use meilisearch_types::error::{Code, ErrorCode};
|
use meilisearch_types::error::{Code, ErrorCode};
|
||||||
use meilisearch_types::tasks::{Kind, Status};
|
use meilisearch_types::tasks::{Kind, Status};
|
||||||
use meilisearch_types::{heed, milli, versioning};
|
use meilisearch_types::{heed, milli};
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
use crate::TaskId;
|
use crate::TaskId;
|
||||||
|
@ -2,7 +2,6 @@ use meilisearch_types::{
|
|||||||
milli,
|
milli,
|
||||||
milli::progress::{Progress, VariableNameStep},
|
milli::progress::{Progress, VariableNameStep},
|
||||||
tasks::{KindWithContent, Status, Task},
|
tasks::{KindWithContent, Status, Task},
|
||||||
versioning::{VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::{processing::UpgradeDatabaseProgress, Error, IndexScheduler, Result};
|
use crate::{processing::UpgradeDatabaseProgress, Error, IndexScheduler, Result};
|
||||||
@ -30,7 +29,8 @@ impl IndexScheduler {
|
|||||||
indexes.len() as u32,
|
indexes.len() as u32,
|
||||||
));
|
));
|
||||||
let index = self.index(uid)?;
|
let index = self.index(uid)?;
|
||||||
milli::update::upgrade::upgrade(&index, from, progress.clone());
|
milli::update::upgrade::upgrade(&index, from, progress.clone())
|
||||||
|
.map_err(|e| Error::from_milli(e, Some(uid.to_string())))?;
|
||||||
}
|
}
|
||||||
|
|
||||||
for task in tasks.iter_mut() {
|
for task in tasks.iter_mut() {
|
||||||
|
@ -288,7 +288,7 @@ and can not be more than 511 bytes.", .document_id.to_string()
|
|||||||
DocumentEmbeddingError(String),
|
DocumentEmbeddingError(String),
|
||||||
#[error("Upgrade could not be processed because v{0}.{1}.{2} of the database is too old. Please re-open the v{0}.{1}.{2} and use a dump to upgrade your version. The oldest version meilisearch can upgrade from is v1.12.0.")]
|
#[error("Upgrade could not be processed because v{0}.{1}.{2} of the database is too old. Please re-open the v{0}.{1}.{2} and use a dump to upgrade your version. The oldest version meilisearch can upgrade from is v1.12.0.")]
|
||||||
TooOldForUpgrade(u32, u32, u32),
|
TooOldForUpgrade(u32, u32, u32),
|
||||||
#[error("Upgrade could not be processed because the database version (v{0}.{1}.{2}) is newer than the targeted version (v{}.{}.{})", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH)]
|
#[error("Upgrade could not be processed because the database version (v{0}.{1}.{2}) is newer than the targeted version (v{VERSION_MAJOR}.{VERSION_MINOR}.{VERSION_PATCH})")]
|
||||||
CannotDowngrade(u32, u32, u32),
|
CannotDowngrade(u32, u32, u32),
|
||||||
#[error("Cannot upgrade to unknown version v{0}.{1}.{2}.")]
|
#[error("Cannot upgrade to unknown version v{0}.{1}.{2}.")]
|
||||||
CannotUpgradeToUnknownVersion(u32, u32, u32),
|
CannotUpgradeToUnknownVersion(u32, u32, u32),
|
||||||
|
@ -8,8 +8,7 @@ const VERSION_SIZE: usize = std::mem::size_of::<u32>() * 3;
|
|||||||
|
|
||||||
#[derive(thiserror::Error, Debug)]
|
#[derive(thiserror::Error, Debug)]
|
||||||
#[error(
|
#[error(
|
||||||
"Could not decode the version: Expected {} bytes but instead received {0} bytes",
|
"Could not decode the version: Expected {VERSION_SIZE} bytes but instead received {0} bytes"
|
||||||
VERSION_SIZE
|
|
||||||
)]
|
)]
|
||||||
pub struct DecodeVersionError(usize);
|
pub struct DecodeVersionError(usize);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user