-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reintroduce engine version file #1965
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irevoire
force-pushed
the
version-file
branch
from
December 2, 2021 16:31
16b7d5c
to
3e01219
Compare
irevoire
force-pushed
the
new-update-store
branch
from
December 2, 2021 16:41
972b7b1
to
811313f
Compare
MarinPostma
force-pushed
the
new-update-store
branch
from
December 2, 2021 16:41
811313f
to
1c7e3d9
Compare
irevoire
force-pushed
the
version-file
branch
from
December 2, 2021 16:44
3e01219
to
bea1f94
Compare
irevoire
force-pushed
the
new-update-store
branch
from
December 2, 2021 16:56
1c7e3d9
to
49d29b9
Compare
MarinPostma
force-pushed
the
new-update-store
branch
4 times, most recently
from
December 2, 2021 19:14
fa538fa
to
a30e02c
Compare
irevoire
force-pushed
the
version-file
branch
from
December 6, 2021 10:17
bea1f94
to
8d7afc0
Compare
MarinPostma
previously approved these changes
Dec 6, 2021
irevoire
force-pushed
the
version-file
branch
from
December 6, 2021 13:29
8d7afc0
to
8413b45
Compare
Right now if you boot up MeiliSearch and point it to a DB directory created with a previous version of MeiliSearch the existing indexes will be deleted. This used to be prevented by a startup check which would compare the current engine version vs what was stored in the DB directory's version file, but this functionality seems to have been lost after a few refactorings of the code. In order to go back to the old behavior we'll need to reintroduce the VERSION file that used to be present; I considered reusing the metadata.json file used in the dumps feature, but this seemed like the simpler and more approach. As the intent is just to restore functionality, the implementation is quite basic. I imagine that in the future we could build on this and do things like compatibility across major/minor versions and even migrating between formats. This PR was made thanks to @mbStavola Closes #1840
irevoire
force-pushed
the
version-file
branch
from
December 6, 2021 13:31
8413b45
to
a0e1293
Compare
MarinPostma
approved these changes
Dec 6, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors merge
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now if you boot up MeiliSearch and point it to a DB directory created with a previous version of MeiliSearch the existing indexes will be deleted. This used to be prevented by a startup check which would compare the current engine version vs what was stored in the DB directory's version file, but this functionality seems to have been lost after a few refactorings of the code.
In order to go back to the old behavior we'll need to reintroduce the
VERSION
file that used to be present; I considered reusing themetadata.json
file used in the dumps feature, but this seemed like the simpler and more approach. As the intent is just to restore functionality, the implementation is quite basic. I imagine that in the future we could build on this and do things like compatibility across major/minor versions and even migrating between formats.This PR was made thanks to @mbStavola and is basically a port of his PR #1860 after a big refacto of the code #1796.
Closes #1840