Commit Graph

31 Commits

Author SHA1 Message Date
Tamo
c9c7da3626
fix(dump): Uncompress the dump IN the data.ms
When loading a dump with docker, we had two problems.
After creating a tempdirectory, uncompressing and re-indexing the dump:
1. We try to `move` the new “data.ms” onto the currently present
   one. The problem is that if the `data.ms` is a mount point because
   that's what peoples do with docker usually. We can't override
   a mount point, and thus we were throwing an error.
2. The tempdir is created in `/tmp`, which is usually quite small AND may not
   be on the same partition as the `data.ms`. This means when we tried to move
   the dump over the `data.ms`, it was also failing because we can't move data
   between two partitions.
==============
1 was fixed by deleting the *content* of the `data.ms` and moving the *content*
of the tempdir *inside* the `data.ms`. If someone tries to create volumes inside
the `data.ms` that's his problem, not ours.
2 was fixed by creating the tempdir *inside* of the `data.ms`. If a user mounted
its `data.ms` on a large partition, there is no reason he could not load a big
dump because his `/tmp` was too small. This solves the issue; now the dump is
extracted and indexed on the same partition the `data.ms` will lay.

fix #1833
2022-01-10 14:56:03 +01:00
Marin Postma
b28a465304 bug(lib): drop env on last use
fixes the `too many open files` error when running tests by closing the
environment on last drop
2021-12-16 10:57:55 +01:00
Marin Postma
23e35fa526 feat(dumps): drop dump V1 support 2021-12-07 10:36:27 +01:00
many
ffefd0caf2
feat(auth): API keys
implements:
https://github.com/meilisearch/specifications/blob/develop/text/0085-api-keys.md

- Add tests on API keys management route (meilisearch-http/tests/auth/api_keys.rs)
- Add tests checking authorizations on each meilisearch routes (meilisearch-http/tests/auth/authorization.rs)
- Implement API keys management routes (meilisearch-http/src/routes/api_key.rs)
- Create module to manage API keys and authorizations (meilisearch-auth)
- Reimplement GuardedData to extend authorizations (meilisearch-http/src/extractors/authentication/mod.rs)
- Change X-MEILI-API-KEY by Authorization Bearer (meilisearch-http/src/extractors/authentication/mod.rs)
- Change meilisearch routes to fit to the new authorization feature (meilisearch-http/src/routes/)

- close #1867
2021-12-06 09:52:41 +01:00
Marin Postma
a30e02c18c feat(all): Task store
implements:
https://github.com/meilisearch/specifications/blob/develop/text/0060-refashion-updates-apis.md

linked PR:

- #1889
- #1891
- #1892
- #1902
- #1906
- #1911
- #1914
- #1915
- #1916
- #1918
- #1924
- #1925
- #1926
- #1930
- #1936
- #1937
- #1942
- #1944
- #1945
- #1946
- #1947
- #1950
- #1951
- #1957
- #1959
- #1960
- #1961
- #1962
- #1964

- https://github.com/meilisearch/milli/pull/414
- https://github.com/meilisearch/milli/pull/409
- https://github.com/meilisearch/milli/pull/406
- https://github.com/meilisearch/milli/pull/418

- close #1687
- close #1786
- close #1940
- close #1948
- close #1949
- close #1932
- close #1956
2021-12-02 20:14:42 +01:00
many
06e6eaa7b4
Remove useless Facet variant 2021-11-03 16:11:09 +01:00
many
30a094cbb2
Change lacking errors 2021-11-03 14:33:33 +01:00
Tamo
c752c14c46
refactorize the dump and snapshot 2021-10-29 17:25:51 +02:00
Tamo
87a8bf5e96
write and load the user-id in the dumps 2021-10-29 17:25:51 +02:00
bors[bot]
cf67964133
Merge #1848
1848: Error format and Definition r=MarinPostma a=ManyTheFish



Co-authored-by: many <maxime@meilisearch.com>
2021-10-28 14:15:35 +00:00
many
7464720426
Fix some errors 2021-10-28 10:47:59 +02:00
Tamo
5e3a53b576
fix a bug in the generation of empty dumps 2021-10-25 14:17:57 +02:00
many
36ab7b3ebd
Fix small typo 2021-10-18 14:17:32 +02:00
many
b4038597ba
Keep persisting tmp files in database directory and put non-persisting tmp files in default tmp dir 2021-10-18 14:16:35 +02:00
Tamo
66dbd3cd34
makes clippy happy 2021-10-06 17:39:04 +02:00
mpostma
85b5260d9d simple search unit test 2021-10-06 14:20:05 +02:00
mpostma
4b4ebad9a9 test dumps 2021-10-06 14:10:26 +02:00
mpostma
ee372a7b30
implement new dump v2 2021-09-30 14:49:13 +02:00
mpostma
66f39aaa92
fix dump v3 2021-09-30 14:49:13 +02:00
mpostma
03af99650d
fix dumpv1 2021-09-30 14:49:13 +02:00
mpostma
8fa6502b16 review changes 2021-09-29 14:17:41 +02:00
mpostma
1f537e1b60 jsonl support 2021-09-29 11:28:02 +02:00
mpostma
102c46f88b clippy + fmt 2021-09-28 22:22:59 +02:00
mpostma
5fa9bc67d7 remove unused dependencies 2021-09-28 22:16:18 +02:00
mpostma
df4e9f4e1e restore dump v1 2021-09-28 19:49:25 +02:00
mpostma
692c676625 fix tests 2021-09-28 18:57:36 +02:00
mpostma
6a1964f146 restore dumps 2021-09-28 11:59:55 +02:00
mpostma
42a6260b65 introduce index resolver 2021-09-24 11:53:11 +02:00
mpostma
12542bf922 refactor update actor 2021-09-22 11:52:50 +02:00
mpostma
def737edee refactor uuid resolver 2021-09-22 10:49:59 +02:00
mpostma
60518449fc split meilisearch-http and meilisearch-lib 2021-09-21 13:23:22 +02:00