3067: Fix task details serialization r=Kerollmops a=ManyTheFish

# Pull Request

- document addition task details always contain the field `indexedDocuments`
  - value is set to `null` when the task is enqueued or processing
  - value is set to `0` when the task is canceled or failed
- the field `deletedDocuments` of the document deletion task details is set to `0` when the task is canceled or failed
- the field `deletedDocuments` of the document clearAll task details is set to `0` when the task is canceled or failed
- the field `deletedTasks` of the task deletion task details is set to `0` when the task is canceled or failed
- the field `canceledTasks` of the task cancelation task details is set to `0` when the task is canceled or failed

## Related issue
Fixes #3057
Fixes #3058


Co-authored-by: ManyTheFish <many@meilisearch.com>
This commit is contained in:
bors[bot]
2022-11-16 16:15:03 +00:00
committed by GitHub
15 changed files with 76 additions and 41 deletions

View File

@ -412,7 +412,7 @@ async fn test_summarized_delete_batch() {
"canceledBy": null,
"details": {
"matchedDocuments": 3,
"deletedDocuments": null
"deletedDocuments": 0
},
"error": {
"message": "Index `test` not found.",
@ -471,7 +471,7 @@ async fn test_summarized_delete_document() {
"canceledBy": null,
"details": {
"matchedDocuments": 1,
"deletedDocuments": null
"deletedDocuments": 0
},
"error": {
"message": "Index `test` not found.",