Skip to content
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

Embed version in the index, reject incompatible versions #695

Closed
kornelski opened this issue Nov 9, 2019 · 7 comments
Closed

Embed version in the index, reject incompatible versions #695

kornelski opened this issue Nov 9, 2019 · 7 comments

Comments

@kornelski
Copy link
Contributor

@kornelski kornelski commented Nov 9, 2019

It seems that using a too-old version of the index can cause breakage (#692).

It would be nice if Tantivy tagged the index with the version it's been created with, and refused to load or update an incompatible index.

@fulmicoton

This comment has been minimized.

Copy link
Member

@fulmicoton fulmicoton commented Nov 9, 2019

That's the point of the introduction of footer... the feature that caused the breakage in #692. It should gieve you a nice error message in the future..

@fulmicoton fulmicoton closed this Nov 9, 2019
@petr-tik

This comment has been minimized.

Copy link
Member

@petr-tik petr-tik commented Nov 9, 2019

@kornelski the reason for closing your ticket is it's a duplicate of #662 that I started working on today.

@kornelski

This comment has been minimized.

Copy link
Contributor Author

@kornelski kornelski commented Nov 10, 2019

Great, thanks :D

@petr-tik

This comment has been minimized.

Copy link
Member

@petr-tik petr-tik commented Nov 10, 2019

Forgot to ask - please don't delete the directory with the old index that was causing the original crash.

It would be great to have some real world examples of indexes that we know would benefit from this change. Thanks

@kornelski

This comment has been minimized.

Copy link
Contributor Author

@kornelski kornelski commented Nov 10, 2019

If you want to inspect the wreck, here it is: https://lib.rs/data/tantivy2.tar.xz

@fulmicoton

This comment has been minimized.

Copy link
Member

@fulmicoton fulmicoton commented Nov 11, 2019

@petr-tik the current crashing index is not entirely relevant here.

It is very easy to build one. Also the footer will mostly be helpful for later compatibility issues.

There is a non null chance that we cannot detect the problem with an existing index... And we will not be able to get the actual version of the index even if we are good enough to return an error it will not include a great error message.

@petr-tik

This comment has been minimized.

Copy link
Member

@petr-tik petr-tik commented Nov 11, 2019

Do you recommend not including the index version found in the footer at all?

I thought it would be most help for debugging to have index_version_supported_by_library and index_version_on_disk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.