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

Allow upgrade API to only upgrade too-old segments #10213

Closed
clintongormley opened this issue Mar 23, 2015 · 3 comments
Closed

Allow upgrade API to only upgrade too-old segments #10213

clintongormley opened this issue Mar 23, 2015 · 3 comments

Comments

@clintongormley
Copy link

The upgrade API today will upgrade any segments which are not the latest Lucene version. When upgrading to 2.0, we won't be able to read 3.x segments, but we can read 4.x segments, so it would be faster for the upgrade API to upgrade JUST the 3.x segments, and leave the 4.x segments to the merge process.

@rmuir
Copy link
Contributor

rmuir commented Apr 7, 2015

Upgrading only 3.x is short-sighted and will leave the same trap for userse for 2.0->3.0.

I do think only segments that are "out of date" should be upgraded. I do think its also nice to have an option to upgrade only the SUPER ANCIENT ones and maybe some tools and stuff can use that. But it should not be the default behavior.

@rmuir
Copy link
Contributor

rmuir commented Apr 7, 2015

I would go further too, if we add an 'ancient' only option (segments from previous lucene major version), and make sure logging and various stats apis etc scream bloody murder when users have ancient segments. Really make the user feel shame and humiliation for still having them around. Otherwise nothing will get done.

@clintongormley
Copy link
Author

I do think only segments that are "out of date" should be upgraded. I do think its also nice to have an option to upgrade only the SUPER ANCIENT ones and maybe some tools and stuff can use that. But it should not be the default behavior.

Agreed - it's just about adding the option to do the least work possible to get your cluster moving again. This would be particularly useful when combined with the upgrade-old-segments-as-part-of-background-merge-process functionality that we've discussed.

mikemccand added a commit that referenced this issue Apr 16, 2015
… an old Lucene version are upgraded

This option defaults to false, because it is also important to upgrade
the "merely old" segments since many Lucene improvements happen within
minor releases.

But you can pass true to do the minimal work necessary to upgrade to
the next major Elasticsearch release.

The HTTP GET upgrade request now also breaks out how many bytes of
ancient segments need upgrading.

Closes #10213

Closes #10540
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants