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

Commit b46fa77

Browse files
committed
Remove --max-index-size and --max-task-db-size
1 parent f80952b commit b46fa77

File tree

3 files changed

+64
-96
lines changed

3 files changed

+64
-96
lines changed

text/0034-telemetry-policies.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ The collected data is sent to [Segment](https://segment.com/). Segment is a plat
8686
| `infos.ignore_missing_snapshot` | `true` if `--ignore_missing_snapshot` is specified to true, otherwise `false` | true | Every Hour |
8787
| `infos.ignore_snapshot_if_db_exists` | `true` if `--ignore_snapshot_if_db_exists` is specified to true, otherwise `false` | true | Every Hour |
8888
| `infos.http_addr` | `true` if `--http-addr`/`MEILI_HTTP_ADDR` is specified, otherwise `false` | true| Every Hour |
89-
| `infos.max_index_size` | Value of `--max-index-size`/`MEILI_INDEX_SIZE` in bytes | 336042103 | Every Hour |
90-
| `infos.max_task_db_size` | Value of `--max-task-db-size`/`MEILI_MAX_TASK_DB_SIZE` in bytes | 336042103 | Every Hour |
9189
| `infos.http_payload_size_limit` | Value of `--http-payload-size-limit`/`MEILI_HTTP_PAYLOAD_SIZE_LIMIT` in bytes | 336042103 | Every Hour |
9290
| `infos.disable_auto_batching` | `true` if `--disable-auto-batching`/`MEILI_DISABLE_AUTO_BATCHING` is specified to true, otherwise `false` | `true` | Every Hour |
9391
| `infos.log_level` | Value of `--log-level`/`MEILI_LOG_LEVEL` | debug | Every Hour |
@@ -173,7 +171,7 @@ The collected data is sent to [Segment](https://segment.com/). Segment is a plat
173171
| `filtered_by_before_finished_at` | `true` if tasks are filtered by the `beforeFinishedAt` query parameter, otherwise `false` | false | `Tasks Seen`, `Tasks Canceled`, `Tasks Deleted` |
174172
| `filtered_by_after_finished_at` | `true` if tasks are filtered by the `afterFinishedAt` query parameter, otherwise `false` | false | `Tasks Seen`, `Tasks Canceled`, `Tasks Deleted` |
175173
| `per_index_uid` | `true` if an uid is used to fetch an index stat resource, otherwise `false` | false | `Stats Seen` |
176-
| `swap_operation_number` | The number of swap operation given in `POST /swap-indexes` API call | 2 | `Indexes Swapped` |
174+
| `swap_operation_number` | The number of swap operation given in `POST /swap-indexes` API call | 2 | `Indexes Swapped` |
177175
| `matching_strategy.most_used_strategy` | Most used word matching strategy among all search requests in this batch | `last` | `Documents Searched POST`, `Documents Searched GET` |
178176
| `per_document_id` | `true` if `DELETE /indexes/:indexUid/documents/:documentUid` endpoint was used in this batch, otherwise `false` | false | `Documents Deleted` |
179177
| `clear_all` | `true` if `DELETE /indexes/:indexUid/documents` endpoint was used in this batch, otherwise `false` | false | `Documents Deleted` |
@@ -214,8 +212,6 @@ This property allows us to gather essential information to better understand on
214212
| infos.ignore_missing_snapshot | `true` if `--ignore-missing-snapshot` is specified to true, otherwise `false` | `true` |
215213
| infos.ignore_snapshot_if_db_exists | `true` if `--ignore-snapshot-if-db-exists` is specified to true, otherwise `false` | `true` |
216214
| infos.http_addr | `true` if `--http-addr`/`MEILI_HTTP_ADDR` is specified, otherwise `false` | `true`|
217-
| infos.max_index_size | Value of `--max-index-size`/`MEILI_INDEX_SIZE` in bytes | `336042103` |
218-
| infos.max_task_db_size | Value of `--max-task-db-size`/`MEILI_MAX_TASK_DB_SIZE` in bytes | `336042103` |
219215
| infos.http_payload_size_limit | Value of `--http-payload-size-limit`/`MEILI_HTTP_PAYLOAD_SIZE_LIMIT` in bytes | `336042103` |
220216
| infos.disable_auto_batching | `true` if `--disable-auto-batching`/`MEILI_DISABLE_AUTO_BATCHING` is specified to true, otherwise `false` | `true` |
221217
| infos.log_level | Value of `--log-level`/`MEILI_LOG_LEVEL` | `debug` |

text/0060-tasks-api.md

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -534,50 +534,46 @@ HTTP Code: `404 Not Found`
534534

535535
- The `:taskUid` is inferred when the message is generated.
536536

537-
#### 8. `MEILI_MAX_TASK_DB_SIZE` env var and `--max-task-db-size` CLI option
538-
539-
See [0119-instance-options](0119-instance-options.md##3312-max-taskdb-size)
540-
541-
#### 9. Asynchronous Write Operations on Index resource
537+
#### 8. Asynchronous Write Operations on Index resource
542538

543539
- 💡 Automatic index creation using the `/indexes/:indexToCreate/documents` route generates a `documentAdditionOrUpdate` task that also handles index creation.
544540

545-
#### 10. Paginate `task` resource lists
541+
#### 9. Paginate `task` resource lists
546542

547543
The API endpoint `GET /tasks` is browsable using a keyset-based pagination.
548544

549-
##### 10.1. Why a Seek/Keyset based pagination?
545+
##### 9.1. Why a Seek/Keyset based pagination?
550546

551547
Keyset-based pagination is more appropriate when the data can grow or shrink quickly in terms of magnitude.
552548

553-
###### 10.1.1. Pros
549+
###### 9.1.1. Pros
554550

555551
The performance is better than the not-so-good but old pagination with `offset`/`limit`.
556552

557553
Seek/Keyset pagination keeps the results consistent between each page as the data evolves. It avoids the [Page Drift effect](https://use-the-index-luke.com/sql/partial-results/fetch-next-page), especially when the data is sorted from the most recent to the oldest.
558554

559555
Moreover, the performance is superior to traditional pagination since the computational complexity remains constant to reach the identifier marking the beginning of the new slice to be returned from a hash table.
560556

561-
###### 10.1.2. Cons
557+
###### 9.1.2. Cons
562558

563559
The main drawback of this type of pagination is that it does not navigate within a finite number of pages. It is also limited to a precise sorting criterion on unique identifiers ordered sequentially.
564560

565-
##### 10.2. Response attributes
561+
##### 9.2. Response attributes
566562

567563
| field | type | description |
568564
|-------|------|--------------------------------------|
569565
| limit | integer | Default `20`. |
570566
| from | integer | The first task uid returned |
571567
| next | integer - nullable | Represents the value to send in `from` to fetch the next slice of the results. The first item for the next slice starts at this exact number. When the returned value is null, it means that all the data have been browsed in the given order. |
572568

573-
##### 10.3. GET query parameters
569+
##### 9.3. GET query parameters
574570

575571
| field | type | required | description |
576572
|-------|------|----------|--------------|
577573
| limit | integer | No | Default `20`. Limit on the number of tasks to be returned. |
578574
| from | integer | No | Limit results to tasks with uids equal to and lower than this uid. |
579575

580-
##### 10.4. Usage examples
576+
##### 9.4. Usage examples
581577

582578
This part demonstrates keyset paging in action on `/tasks`. The items `uid` remains sorted sequentially and can be used to navigate a list of `tasks` objects.
583579

@@ -666,26 +662,26 @@ This part demonstrates keyset paging in action on `/tasks`. The items `uid` rema
666662

667663
- 💡 `next` response parameter is null because there are no more `tasks` to fetch. It means that the response represents the last slice of results for the given resource list.
668664

669-
##### 10.5. Behaviors for `limit` and `from` query parameters
665+
##### 9.5. Behaviors for `limit` and `from` query parameters
670666

671-
###### 10.5.1. `limit`
667+
###### 9.5.1. `limit`
672668

673669
- If `limit` is not set, the default value is chosen.
674670

675-
###### 10.5.2. `from`
671+
###### 9.5.2. `from`
676672

677673
- If `from` is set with an out of bounds task `uid`, the response returns the tasks that are the nearest to the specified uid, the `next` field is set to the next page. It will be equivalent to call the `/tasks` route without any parameter.
678674

679-
###### 10.5.3. Errors
675+
###### 9.5.3. Errors
680676

681677
- 🔴 Sending a value with a different type than `Integer` for `limit` returns a [bad_request](0061-error-format-and-definitions.md#bad_request) error.
682678
- 🔴 Sending a value with a different type than `Integer` for `from` returns a [bad_request](0061-error-format-and-definitions.md#bad_request) error.
683679

684-
#### 11. Filtering task resources
680+
#### 10. Filtering task resources
685681

686682
The tasks API endpoints are filterable by `uids`, `indexUids`, `types`, `statuses`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt` query parameters.
687683

688-
##### 11.1 Query parameters definition
684+
##### 10.1 Query parameters definition
689685

690686
| parameter | type | required | description |
691687
|-----------|--------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
@@ -701,9 +697,9 @@ The tasks API endpoints are filterable by `uids`, `indexUids`, `types`, `status
701697
| beforeFinishedAt | string | No | Filter tasks based on their finishedAt time. Retrieve tasks finished before the given filter value. |
702698
| afterFinishedAt | string | No | Filter tasks based on their finishedAt time. Retrieve tasks finished after the given filter value. |
703699

704-
##### 11.2. Query Parameters Behaviors
700+
##### 10.2. Query Parameters Behaviors
705701

706-
###### 11.2.1. `uids`
702+
###### 10.2.1. `uids`
707703

708704
Filter tasks by their related unique identifier. By default, when `uids` query parameter is not set, all the tasks are concerned. It is possible to specify several uid by separating them with the `,` character.
709705

@@ -715,7 +711,7 @@ The tasks API endpoints are filterable by `uids`, `indexUids`, `types`, `status
715711

716712
- 🔴 Sending values with a different type than `Integer` being separated by `,` for the `uid` parameter returns an [`invalid_task_uids_filter`](0061-error-format-and-definitions.md#invalid_task_uids_filter) error.
717713

718-
###### 11.2.2. `indexUids`
714+
###### 10.2.2. `indexUids`
719715

720716
Filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are concerned. It is possible to specify several indexUids by separating them with the `,` character.
721717

@@ -725,7 +721,7 @@ Filter tasks by their related index. By default, when `indexUids` query paramete
725721

726722
`indexUids` is **case-sensitive**.
727723

728-
###### 11.2.3. `statuses`
724+
###### 10.2.3. `statuses`
729725

730726
Filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are concerned. It's possible to specify several statuses by separating them with the `,` character.
731727

@@ -737,7 +733,7 @@ Filter tasks by their status. By default, when `statuses` query parameter is not
737733

738734
- 🔴 If the `statuses` parameter value is not consistent with one of the task statuses, an [`invalid_task_statuses_filter`](0061-error-format-and-definitions.md#invalid_task_statuses_filter) error is returned.
739735

740-
###### 11.2.4. `types`
736+
###### 10.2.4. `types`
741737

742738
Filter tasks by their related type. By default, when `types` query parameter is not set, all task types are concerned. It's possible to specify several types by separating them with the `,` character.
743739

@@ -749,7 +745,7 @@ Filter tasks by their related type. By default, when `types` query parameter is
749745

750746
- 🔴 If the `types` parameter value is not consistent with one of the task types, an [`invalid_task_types_filter`](0061-error-format-and-definitions.md#invalid_task_types_filter) error is returned.
751747

752-
###### 11.2.5. `canceledBy`
748+
###### 10.2.5. `canceledBy`
753749

754750
Filter tasks by the `taskCancelation` uid that canceled them. It's possible to specify several task uids by separating them with the `,` character.
755751

@@ -761,15 +757,15 @@ Filter tasks by the `taskCancelation` uid that canceled them. It's possible to s
761757

762758
- 🔴Sending a value with a different type than `Integer` for the `canceledBy` parameter returns an [`invalid_task_canceled_by_filter`](0061-error-format-and-definitions.md#invalid_task_canceled_by_filter) error.
763759

764-
###### 11.2.6. Date Parameters
760+
###### 10.2.6. Date Parameters
765761

766762
Date filters accepts the RFC 3339 format. The following syntaxes are valid:
767763

768764
- `YYYY-MM-DD`
769765
- `YYYY-MM-DDTHH:MM:SSZ`
770766
- `YYYY-MM-DDTHH:MM:SS+01:00`
771767

772-
###### 11.2.6.1. `beforeEnqueuedAt` and `afterEnqueuedAt`
768+
###### 10.2.6.1. `beforeEnqueuedAt` and `afterEnqueuedAt`
773769

774770
Filter tasks based on their enqueuedAt time. Retrieve tasks enqueued before/after the given filter value.
775771

@@ -780,7 +776,7 @@ Filter tasks based on their enqueuedAt time. Retrieve tasks enqueued before/afte
780776
- 🔴 The date filters are exclusive. It means the given value will not be included.
781777
- 🔴 Sending an invalid value for the date parameter returns an [`invalid_task_date_filter`](0061-error-format-and-definitions.md#invalid_task_date_filter) error.
782778

783-
###### 11.2.6.2. `beforeStartedAt` and `afterStartedAt`
779+
###### 10.2.6.2. `beforeStartedAt` and `afterStartedAt`
784780

785781
Filter tasks based on their startedAt time. Retrieve tasks started before/after the given filter value.
786782

@@ -791,7 +787,7 @@ Filter tasks based on their startedAt time. Retrieve tasks started before/after
791787
- 🔴 The date filters are exclusive. It means the given value will not be included.
792788
- 🔴 Sending an invalid value for the date parameter returns an [`invalid_task_date_filter`](0061-error-format-and-definitions.md#invalid_task_date_filter) error.
793789

794-
###### 11.2.6.3. `beforeFinishedAt` and `afterFinishedAt`
790+
###### 10.2.6.3. `beforeFinishedAt` and `afterFinishedAt`
795791

796792
Filter tasks based on their finishedAt time. Retrieve tasks finished before/after the given filter value.
797793

@@ -803,15 +799,15 @@ Filter tasks based on their finishedAt time. Retrieve tasks finished before/afte
803799
- 🔴 Sending an invalid value for the date parameter returns an [`invalid_task_date_filter`](0061-error-format-and-definitions.md#invalid_task_date_filter) error.
804800

805801

806-
###### 11.2.7. Select multiple values for the same filter
802+
###### 10.2.7. Select multiple values for the same filter
807803

808804
It is possible to specify multiple values for a filter using the `,` character.
809805

810806
For example, to select the `enqueued` and `processing` tasks of the `movies` and `movie_reviews` indexes, it is possible to express it like this: `/tasks?indexUids=movies,movie_reviews&statuses=enqueued,processing`
811807

812808
---
813809

814-
##### 11.3. Usages examples
810+
##### 10.3. Usages examples
815811

816812
This part demonstrates filtering on `/tasks`.
817813

@@ -986,7 +982,7 @@ This part demonstrates filtering on `/tasks`.
986982

987983
---
988984

989-
##### 11.4. Empty `results`
985+
##### 10.4. Empty `results`
990986

991987
If no results match the filters. A response is returned with an empty `results` array.
992988

0 commit comments

Comments
 (0)