mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
rename the dumpExport to dumpCreation
This commit is contained in:
parent
581d8b0a94
commit
3e45fdf7c5
16 changed files with 79 additions and 77 deletions
|
@ -59,7 +59,7 @@ impl From<KindWithContent> for AutobatchKind {
|
|||
KindWithContent::IndexSwap { .. } => AutobatchKind::IndexSwap,
|
||||
KindWithContent::TaskCancelation { .. }
|
||||
| KindWithContent::TaskDeletion { .. }
|
||||
| KindWithContent::DumpExport { .. }
|
||||
| KindWithContent::DumpCreation { .. }
|
||||
| KindWithContent::Snapshot => {
|
||||
panic!("The autobatcher should never be called with tasks that don't apply to an index.")
|
||||
}
|
||||
|
|
|
@ -409,7 +409,7 @@ impl IndexScheduler {
|
|||
}
|
||||
|
||||
// 4. we batch the dumps.
|
||||
let to_dump = self.get_kind(rtxn, Kind::DumpExport)? & enqueued;
|
||||
let to_dump = self.get_kind(rtxn, Kind::DumpCreation)? & enqueued;
|
||||
if let Some(to_dump) = to_dump.min() {
|
||||
return Ok(Some(Batch::Dump(
|
||||
self.get_task(rtxn, to_dump)?.ok_or(Error::CorruptedTaskQueue)?,
|
||||
|
@ -540,16 +540,14 @@ impl IndexScheduler {
|
|||
Batch::Snapshot(_) => todo!(),
|
||||
Batch::Dump(mut task) => {
|
||||
let started_at = OffsetDateTime::now_utc();
|
||||
let (keys, instance_uid, dump_uid) = if let KindWithContent::DumpExport {
|
||||
keys,
|
||||
instance_uid,
|
||||
dump_uid,
|
||||
} = &task.kind
|
||||
{
|
||||
(keys, instance_uid, dump_uid)
|
||||
} else {
|
||||
unreachable!();
|
||||
};
|
||||
let (keys, instance_uid, dump_uid) =
|
||||
if let KindWithContent::DumpCreation { keys, instance_uid, dump_uid } =
|
||||
&task.kind
|
||||
{
|
||||
(keys, instance_uid, dump_uid)
|
||||
} else {
|
||||
unreachable!();
|
||||
};
|
||||
let dump = dump::DumpWriter::new(*instance_uid)?;
|
||||
|
||||
// 1. dump the keys
|
||||
|
|
|
@ -606,8 +606,8 @@ impl IndexScheduler {
|
|||
KindDump::TasksDeletion { query, tasks } => {
|
||||
KindWithContent::TaskDeletion { query, tasks }
|
||||
}
|
||||
KindDump::DumpExport { dump_uid, keys, instance_uid } => {
|
||||
KindWithContent::DumpExport { dump_uid, keys, instance_uid }
|
||||
KindDump::DumpCreation { dump_uid, keys, instance_uid } => {
|
||||
KindWithContent::DumpCreation { dump_uid, keys, instance_uid }
|
||||
}
|
||||
KindDump::Snapshot => KindWithContent::Snapshot,
|
||||
},
|
||||
|
|
|
@ -253,8 +253,10 @@ pub fn swap_index_uid_in_task(task: &mut Task, swap: (&str, &str)) {
|
|||
}
|
||||
}
|
||||
}
|
||||
K::TaskCancelation { .. } | K::TaskDeletion { .. } | K::DumpExport { .. } | K::Snapshot => {
|
||||
}
|
||||
K::TaskCancelation { .. }
|
||||
| K::TaskDeletion { .. }
|
||||
| K::DumpCreation { .. }
|
||||
| K::Snapshot => {}
|
||||
};
|
||||
for index_uid in index_uids {
|
||||
if index_uid == swap.0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue