Update crates/index-scheduler/src/lib.rs

Co-authored-by: Clément Renault <clement@meilisearch.com>
This commit is contained in:
Tamo 2024-11-20 14:36:05 +01:00 committed by GitHub
parent a7ac590e9e
commit 83d1f858c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -802,7 +802,7 @@ impl IndexScheduler {
if let Some(batch_uids) = batch_uids {
let mut batch_tasks = RoaringBitmap::new();
for batch_uid in batch_uids {
if Some(*batch_uid) == processing_batch.as_ref().map(|batch| batch.uid) {
if processing_batch.as_ref().map_or(false, |batch| batch.uid == *batch_uid) {
batch_tasks |= &processing_tasks;
} else {
batch_tasks |= self.tasks_in_batch(rtxn, *batch_uid)?;