mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
polish the global structure of the batch creation
This commit is contained in:
parent
78ca4bf608
commit
1efccb1bc4
3 changed files with 179 additions and 60 deletions
|
@ -221,15 +221,21 @@ impl IndexScheduler {
|
|||
}
|
||||
};
|
||||
let mut batch = match self.create_next_batch(&wtxn) {
|
||||
Ok(batch) => batch,
|
||||
Ok(Some(batch)) => batch,
|
||||
Ok(None) => continue,
|
||||
Err(e) => {
|
||||
log::error!("{}", e);
|
||||
continue;
|
||||
}
|
||||
};
|
||||
// 1. store the starting date with the bitmap of processing tasks
|
||||
// 2. update the tasks with a starting date *but* do not write anything on disk
|
||||
|
||||
// 3. process the tasks
|
||||
let res = self.process_batch(&mut wtxn, batch);
|
||||
|
||||
// 4. store the updated tasks on disk
|
||||
|
||||
// TODO: TAMO: do this later
|
||||
// must delete the file on disk
|
||||
// in case of error, must update the tasks with the error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue