Meilisearch key deletion #739
Replies: 2 comments 1 reply
-
Hi @axotion 👋
This has to do with how LMDB works. As long as the record is being read, it will be kept in the file.
No. Once you replace the key with a new one, it will stop being accessed and will eventually be marked as deleted. It might take a bit of time though. You can read more about how LMDB works in our Storage docs. |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for clarification! I just want to make sure about one thing
Does marking as deleted means that it will be eventually removed from file, and reduce size? I read those docs
But they still are not clear to me whenever file size will shrink when e.g I mark all keys are deleted |
Beta Was this translation helpful? Give feedback.
-
Hi!
I have a question regarding deleting keys. Why they are staying in auth/data.md file after all? It does not make sense to me to be honest and It raises some problem with production enviroment, when for example we are issuing always new keys to users and remove the old (because of expirations). At the end of the month we could end up with a data.md file with over N GB size.... which does not seems to be expected behaviour
Any idea why it is done in this particular way? Or maybe I'm missing something here? Will it grow indefinitely?
EDIT: I see the same is happening to tasks, they are staying in tasks/data.md folder. In my prod environment it already takes
EDIT2: I see that there is an endpoint to remove old tasks - https://www.meilisearch.com/docs/reference/api/tasks#delete-tasks
Beta Was this translation helpful? Give feedback.
All reactions