Commit Graph

46 Commits

Author SHA1 Message Date
Loïc Lecrenier
78ffa00f98 Move index swap error handling from meilisearch-http to index-scheduler
And make index_not_found error asynchronous, since we can't know
whether the index will exist by the time the index swap task is
processed.

Improve the index-swap test to verify that future tasks are not swapped
and to test the new error messages that were introduced.
2022-10-27 11:45:38 +02:00
Irevoire
7307c4dacd
fix clippy 2022-10-27 11:35:22 +02:00
Irevoire
33996071ea
fix clippy from the CI 2022-10-27 11:35:21 +02:00
Irevoire
07d39776f9
fix clippy _once again_ 2022-10-27 11:35:21 +02:00
Loïc Lecrenier
1f75caae88
Fix a few index swap bugs.
1. Details of the indexSwap task
2. Query tasks with type=indexUid
3. Synchronous error message for multiple index not found
2022-10-27 11:35:17 +02:00
Kerollmops
e0548e42e7
Rename the Snapshot task into SnapshotCreation 2022-10-27 11:35:14 +02:00
Loïc Lecrenier
6db90ba6cc
Make sure that we don't delete or cancel future tasks
This should already have been the case before, but there is no harm
in adding another check.
2022-10-27 11:35:13 +02:00
Irevoire
e0821ad4b0
remove an useless dbg 2022-10-27 11:35:13 +02:00
Irevoire
61f0940f8c
fix an issue with the dates 2022-10-27 11:35:13 +02:00
Loïc Lecrenier
d92425658e
Add index scheduler tests for task cancelation 2022-10-27 11:35:12 +02:00
Irevoire
0aca5e84b9
rename received_document_ids to matched_documents in the DocumentDeletion task type (reimplementation of #2826) 2022-10-27 11:35:12 +02:00
Irevoire
9c00b159ba
fix clippy 2022-10-27 11:35:11 +02:00
Irevoire
7e52f1effb
remove a lot of unecessary clone and ref 2022-10-27 11:35:11 +02:00
Loïc Lecrenier
4d25c159e6
Apply code review suggestions 2022-10-27 11:35:11 +02:00
Loïc Lecrenier
e9cd6cbbee
Revert implementation of get_status to query only the database 2022-10-27 11:35:11 +02:00
Loïc Lecrenier
4a35eb9849
Fix (hopefully) queries that include processing tasks 2022-10-27 11:35:11 +02:00
Loïc Lecrenier
493a8cff31
Adjust task details correctly following index swap 2022-10-27 11:35:10 +02:00
Loïc Lecrenier
4de445d386
Start testing unexpected errors and panics in index scheduler 2022-10-27 11:35:10 +02:00
Loïc Lecrenier
e3848b5f28
Add assert method to verify validity of index scheduler state 2022-10-27 11:35:10 +02:00
Irevoire
ecf4e43b3d
rename the dumpExport to dumpCreation 2022-10-27 11:35:10 +02:00
Irevoire
e9055f5572
fix clippy 2022-10-27 11:35:08 +02:00
Irevoire
8d1408c65e
fix the import of the dumpv4&v5 when there is no instance-uid + rename the Kind+KindWithContent+Details variant for the DocumentImport and the Setting 2022-10-27 11:35:05 +02:00
Clément Renault
80b2e70ee7
Introduce a rustfmt file 2022-10-27 11:35:05 +02:00
Loïc Lecrenier
17cd2a4aa0
Implement POST /indexes-swap 2022-10-27 11:34:15 +02:00
Loïc Lecrenier
28bd8b6c6b
Remove key from index_tasks database when the value is empty 2022-10-27 11:34:15 +02:00
Loïc Lecrenier
bdb17954d2
Fix bug where assert used != instead of ==
And update snapshot tests.
2022-10-27 11:34:15 +02:00
Loïc Lecrenier
23b01a58df
cargo fmt 2022-10-27 11:34:14 +02:00
Loïc Lecrenier
10a547df4f
Apply suggestions from code review
Co-authored-by: Clément Renault <clement@meilisearch.com>

Apply suggestions from code review

Co-authored-by: Clément Renault <clement@meilisearch.com>
Co-authored-by: Tamo <tamo@meilisearch.com>

Apply suggestions from code review

Co-authored-by: Clément Renault <clement@meilisearch.com>
Co-authored-by: Tamo <tamo@meilisearch.com>

Apply code review suggestion

Co-authored-by: Clément Renault <clement@meilisearch.com>
2022-10-27 11:34:14 +02:00
Loïc Lecrenier
22cf0559fe
Implement task date filters
before/after enqueued/started/finished at
2022-10-27 11:34:14 +02:00
Kerollmops
ec0a5a9f01
Remove the useless r#union thing 2022-10-27 11:34:13 +02:00
Kerollmops
b2c5bc67b7
Add more enum-iterator related stuff 2022-10-27 11:34:11 +02:00
Loïc Lecrenier
8954b1bd1d
Fix number of deleted tasks details after duplicate task deletion 2022-10-27 11:34:05 +02:00
Kerollmops
e4d461ecba
Make sure that we do not batch tasks from different indexes 2022-10-27 11:34:03 +02:00
Tamo
510ce9fc51
start moving a lot of task types to meilisearch_types 2022-10-27 11:34:01 +02:00
Tamo
667c282e19
get rids of the index crate + the document_types crate 2022-10-27 11:34:00 +02:00
Kerollmops
5d21c790ef
Make clippy happy 2022-10-27 11:33:47 +02:00
Tamo
ce2dfecc03
connect the new scheduler to meilisearch-http officially.
I can index documents and do search
2022-10-27 11:33:43 +02:00
Tamo
1ea9c0b4c0
write most of the run loop 2022-10-27 11:33:41 +02:00
Tamo
fc098022c7
start integrating the index-scheduler in the meilisearch codebase 2022-10-27 11:33:40 +02:00
Tamo
6b9689a1c0
fix the whole batchKind thingy 2022-10-27 11:33:36 +02:00
Tamo
72b2e68de4
makes the updates getters smoother to uses 2022-10-27 11:33:35 +02:00
Tamo
7879189c6b
make the project compile again 2022-10-27 11:33:35 +02:00
Irevoire
d8b8e04ad1
wip porting the index back in the scheduler 2022-10-27 11:33:34 +02:00
Irevoire
fe330e1be9
add a little bit of documentation 2022-10-27 11:33:34 +02:00
Tamo
705af94fd7
add the task to the index db in the register task 2022-10-27 11:33:34 +02:00
Tamo
ed745591e1
split the scheduler into multiples files 2022-10-27 11:33:34 +02:00