Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Specify the behaviour of the task queue once it is full (#231)
Browse files Browse the repository at this point in the history
* Update 0060-tasks-api.md

* add the special error message when the task queue is full
  • Loading branch information
irevoire authored Apr 18, 2023
1 parent 2b7cc90 commit 4676834
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions text/0060-tasks-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ When the request is successful, Meilisearch returns the HTTP code 202 Accepted.
If a user tries deleting an `enqueued`, or `processing` task, it won’t throw an error. Task deletion is an atomic transaction; all tasks are successfully deleted, or none aren't.

- 🔴 Sending a task deletion without filtering query parameters returns a [missing_task_filters](0061-error-format-and-definitions.md#missing_task_filters) error.
- 🔴 Sending a task once the task queue is full will throw a [`no_space_left_on_device`](0061-error-format-and-definitions.md#no_space_left_on_device) error. Once this state is reached, the only possible action is to delete tasks.

The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).

Expand Down
12 changes: 12 additions & 0 deletions text/0061-error-format-and-definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2634,6 +2634,7 @@ HTTP Code: `500 Internal Server Error` when `Synchronous`
### Context

This error occurs when the host system partition has reached its maximum capacity and no longer accepts writes.
It can also happens when the task queue reaches its limit of ~10GiB of tasks (~10M tasks).

### Error Definition

Expand All @@ -2648,6 +2649,17 @@ HTTP Code: `500 Internal Server Error` when `Synchronous`
}
```

In the case of the task queue being full the HTTP Code returned is `422 Unprocessable Entity` when `Synchronous`.

```json
{
"message": "Meilisearch cannot receive write operations because the limit of the task database has been reached. Please delete tasks to continue performing write operations.",
"code": "no_space_left_on_device",
"type": "system",
"link": "https://docs.meilisearch.com/errors#no_space_left_on_device"
}
```

---

## too_many_open_files
Expand Down

0 comments on commit 4676834

Please sign in to comment.