mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-10 13:34:30 +01:00
fix the dumps missing the empty swap index tasks
This commit is contained in:
parent
7a2af06b1e
commit
95975944d7
@ -496,7 +496,7 @@ impl IndexScheduler {
|
|||||||
|
|
||||||
// 5. We make a batch from the unprioritised tasks. Start by taking the next enqueued task.
|
// 5. We make a batch from the unprioritised tasks. Start by taking the next enqueued task.
|
||||||
let task_id = if let Some(task_id) = enqueued.min() { task_id } else { return Ok(None) };
|
let task_id = if let Some(task_id) = enqueued.min() { task_id } else { return Ok(None) };
|
||||||
let task = self.get_task(rtxn, task_id)?.ok_or(Error::CorruptedTaskQueue)?;
|
let mut task = self.get_task(rtxn, task_id)?.ok_or(Error::CorruptedTaskQueue)?;
|
||||||
|
|
||||||
// If the task is not associated with any index, verify that it is an index swap and
|
// If the task is not associated with any index, verify that it is an index swap and
|
||||||
// create the batch directly. Otherwise, get the index name associated with the task
|
// create the batch directly. Otherwise, get the index name associated with the task
|
||||||
@ -506,6 +506,7 @@ impl IndexScheduler {
|
|||||||
index_name
|
index_name
|
||||||
} else {
|
} else {
|
||||||
assert!(matches!(&task.kind, KindWithContent::IndexSwap { swaps } if swaps.is_empty()));
|
assert!(matches!(&task.kind, KindWithContent::IndexSwap { swaps } if swaps.is_empty()));
|
||||||
|
current_batch.processing(Some(&mut task));
|
||||||
return Ok(Some((Batch::IndexSwap { task }, current_batch)));
|
return Ok(Some((Batch::IndexSwap { task }, current_batch)));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ succeeded [0,1,2,3,4,5,6,]
|
|||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
### Batches Kind:
|
### Batches Kind:
|
||||||
"indexCreation" [0,1,2,3,]
|
"indexCreation" [0,1,2,3,]
|
||||||
"indexSwap" [4,5,]
|
"indexSwap" [4,5,6,]
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
### Batches Index Tasks:
|
### Batches Index Tasks:
|
||||||
a [0,4,5,]
|
a [0,4,5,]
|
||||||
@ -104,6 +104,7 @@ d [3,4,]
|
|||||||
[timestamp] [3,]
|
[timestamp] [3,]
|
||||||
[timestamp] [4,]
|
[timestamp] [4,]
|
||||||
[timestamp] [5,]
|
[timestamp] [5,]
|
||||||
|
[timestamp] [6,]
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
### Batches Started At:
|
### Batches Started At:
|
||||||
[timestamp] [0,]
|
[timestamp] [0,]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user