mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-10 13:34:30 +01:00
stop adding one enqueued tasks to all unprioritized batches
This commit is contained in:
parent
cbcf6c9ba3
commit
cb0c3a5aad
@ -496,8 +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 mut task = self.get_task(rtxn, task_id)?.ok_or(Error::CorruptedTaskQueue)?;
|
let task = self.get_task(rtxn, task_id)?.ok_or(Error::CorruptedTaskQueue)?;
|
||||||
current_batch.processing(Some(&mut task));
|
|
||||||
|
|
||||||
// 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
|
||||||
|
@ -4333,15 +4333,15 @@ mod tests {
|
|||||||
"primaryKey": "mouse"
|
"primaryKey": "mouse"
|
||||||
},
|
},
|
||||||
"stats": {
|
"stats": {
|
||||||
"totalNbTasks": 2,
|
"totalNbTasks": 1,
|
||||||
"status": {
|
"status": {
|
||||||
"processing": 2
|
"processing": 1
|
||||||
},
|
},
|
||||||
"types": {
|
"types": {
|
||||||
"indexCreation": 2
|
"indexCreation": 1
|
||||||
},
|
},
|
||||||
"indexUids": {
|
"indexUids": {
|
||||||
"catto": 2
|
"catto": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"startedAt": "1970-01-01T00:00:00Z",
|
"startedAt": "1970-01-01T00:00:00Z",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user