Skip to content

[7.17] Prevent 6.8 indices upgrade to 8.0 (#82689)#82771

Merged
grcevski merged 5 commits intoelastic:7.17from
grcevski:enhancement/prevent_6.8_indices_upgrade_backport
Jan 20, 2022
Merged

[7.17] Prevent 6.8 indices upgrade to 8.0 (#82689)#82771
grcevski merged 5 commits intoelastic:7.17from
grcevski:enhancement/prevent_6.8_indices_upgrade_backport

Conversation

@grcevski
Copy link
Contributor

This PR is a backport of #82689 with small change to only compute the latest index version, but not act on it.

The check to prevent ES start because of old indices is only applicable to versions 8.0+, since all 7 versions can still work with the older 6.8 index format.

logger.trace("loaded metadata [{}] from [{}]", userData, reader.directory());
assert userData.size() == COMMIT_DATA_SIZE : userData;
assert (userData.size() == COMMIT_DATA_SIZE)
|| ((userData.size() == COMMIT_DATA_SIZE - 1) && (userData.containsKey(OLDEST_INDEX_VERSION_KEY) == false)) : userData;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok ignore my comment on this subject in the 8.x version.

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@grcevski grcevski removed the WIP label Jan 20, 2022
@grcevski grcevski marked this pull request as ready for review January 20, 2022 14:10
@grcevski grcevski merged commit 9864ca9 into elastic:7.17 Jan 20, 2022
@grcevski grcevski changed the title [v7.17] Prevent 6.8 indices upgrade to 8.0 (#82689) [7.17] Prevent 6.8 indices upgrade to 8.0 (#82689) Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants