Sometimes VERSION files can be created empty
While debugging a brand new free trial plan with @nicolasvienot we noticed that Meilisearch couldn't start due to an empty VERSION file. It's very strange as it seems quite rare. However, it doesn't seem impossible as writing to this file is not as enforced as when we use LMDB. We could have missed a disk sync or something.
The VERSION file was never populated with anything as the issue appeared at creation time.
Meilisearch version: We don't know the impacted version but at least before v1.7.4.
Additional context It was running on the cloud, more specifically on Digital Ocean in a Kubernetes and Docker container.
I rewrote this thing with the VERSION file in v0.30; there were some issues with it, which were fixed by patch releases. And then, no one ever modified it, as far as I know. So I’m pretty confident that all the versions since the v1.0 are impacted 😬
Hello,
did we consider the option of writing the version in the main DB? If so, why was it rejected?
The advantage here is we could write the VERSION atomically when creating a main db.
Disadvantages: harder to read if it's in the DB, need a way to support both schemes for backward compat
Other possibility: handle an empty VERSION file as if there was no VERSION file at all.
Needs to be able to reproduce (which is not the case currently) to be able to fix it