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

Rename MEILI_MAX_MDB_SIZE env var and --max-mdb-size option flag #48

Merged
merged 6 commits into from
Jun 16, 2021
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions text/0048-rename-max-mdb-size-var.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
- Title: Rename MAX_MDB_SIZE configuration variable
- Start Date: 2021-
- Specification PR: [#48](https://github.com/meilisearch/specifications/pull/48)
- MeiliSearch Tracking-issues: [transplant/#206](https://github.com/meilisearch/transplant/issues/206)


# Rename MAX_MDB_SIZE configuration variable

## 1. Functional Specification

### I. Summary

This specification is written to rename the `MAX_MDB_SIZE` configuration variable.

### II. Motivation

Since version 0.21 no longer has a main LMDB database for all indexes but one LMBD database per index, the concept of a `main` database no longer exists internally.


### III. Additional Materials
N/A

### IV. Explanation

- Rename `--max-mdb-size` to `--max-index-size`
- Rename `MAX_MDB_SIZE` to `MAX_INDEX_SIZE`
- Error handling at index creation should be iso with version 0.20.

When I test the current version of meilisearch in 0.21, the http call on `POST /indexes/:index_uid/documents` is successful and an empty index is created whereas 0.20 returns an error on the API side and the index is not created.
gmourier marked this conversation as resolved.
Show resolved Hide resolved

```
{
"message": "Impossible to create index; heed error; MDB_MAP_FULL: Environment mapsize limit reached",
"errorCode": "index_creation_failed",
"errorType": "internal_error",
"errorLink": "https://docs.meilisearch.com/errors#index_creation_failed"
}
```

### V. Impact on Documentation

- Update the [Max MDB Size documentation part](https://docs.meilisearch.com/reference/features/configuration.html#max-mdb-size).

### VI. Impact on SDKs
N/A

## 2. Technical Aspects
N/A

## 3. Future Possibilities
- Provide a way to set a custom size per index.