update the autobatcher to batch the addition and deletion together

This commit is contained in:
Tamo 2023-02-08 18:07:59 +01:00
parent 421a9cf05e
commit 2db6347686
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
2 changed files with 183 additions and 129 deletions

View file

@ -206,7 +206,7 @@ impl IndexScheduler {
},
must_create_index,
})),
BatchKind::DocumentImport { method, import_ids, .. } => {
BatchKind::DocumentOperation { method, operation_ids: import_ids, .. } => {
let tasks = self.get_existing_tasks(rtxn, import_ids)?;
let primary_key = match &tasks[0].kind {
KindWithContent::DocumentAdditionOrUpdate { primary_key, .. } => {
@ -322,12 +322,12 @@ impl IndexScheduler {
must_create_index,
}))
}
BatchKind::SettingsAndDocumentImport {
BatchKind::SettingsAndDocumentOperation {
settings_ids,
method,
allow_index_creation,
primary_key,
import_ids,
operation_ids: import_ids,
} => {
let settings = self.create_next_batch_index(
rtxn,
@ -339,11 +339,11 @@ impl IndexScheduler {
let document_import = self.create_next_batch_index(
rtxn,
index_uid.clone(),
BatchKind::DocumentImport {
BatchKind::DocumentOperation {
method,
allow_index_creation,
primary_key,
import_ids,
operation_ids: import_ids,
},
must_create_index,
)?;