Compare commits

..

2 Commits

Author SHA1 Message Date
b7ed3308bb Update grenad 2024-04-09 09:31:23 +02:00
579a96adc7 Actually abort in case of corrupted index 2024-04-04 11:02:54 +02:00
3 changed files with 10 additions and 6 deletions

3
Cargo.lock generated
View File

@ -2148,8 +2148,7 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "grenad"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a007932af5475ebb5c63bef8812bb1c36f317983bb4ca663e9d6dd58d6a0f8c"
source = "git+https://github.com/meilisearch/grenad.git?branch=keep-source-index-in-merger#5a7c10fcd689f5967a8979f6b66da1e0939439ff"
dependencies = [
"bytemuck",
"byteorder",

View File

@ -962,13 +962,18 @@ impl IndexScheduler {
let mut index_wtxn = index.write_txn()?;
let mut tasks = self.apply_index_operation(&mut index_wtxn, &index, op)?;
if index.is_corrupted(&index_wtxn)? {
tracing::error!("Aborting task due to corrupted index");
index_wtxn.abort();
return Err(crate::Error::CorruptedIndex);
}
for task in tasks.iter_mut() {
task.status = Status::Failed;
task.error = Some(Error::CorruptedIndex.into());
}
let tasks = self.apply_index_operation(&mut index_wtxn, &index, op)?;
return Ok(tasks);
}
index.check_document_facet_consistency(&index_wtxn)?.check();

View File

@ -26,7 +26,7 @@ flatten-serde-json = { path = "../flatten-serde-json" }
fst = "0.4.7"
fxhash = "0.2.1"
geoutils = "0.5.1"
grenad = { version = "0.4.5", default-features = false, features = [
grenad = { git = "https://github.com/meilisearch/grenad.git", branch = "keep-source-index-in-merger", version = "0.4.5", default-features = false, features = [
"rayon",
"tempfile",
] }