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

Fix condition that check for new security index #110228

Merged

Conversation

jfreden
Copy link
Contributor

@jfreden jfreden commented Jun 27, 2024

When we create a new index, we create it using the version from IndexVersion.min(IndexVersion.current(), clusterState.nodes().getMaxDataNodeCompatibleIndexVersion()), this means that the created index version will be compatible with all nodes in the cluster.

When we want to check if an index was created on the latest version we don't want to include getMaxDataNodeCompatibleIndexVersion since we need to make sure that the index contains the latest migration, if it doesn't, we want to run the migration.

In the BWC tests, the getMaxDataNodeCompatibleIndexVersion will return the index version form 7.X as the "latest" version (which is wrong) and therefore it will skip the migration, instead it should only skip on the very latest version.

@jfreden jfreden added :Security/Security Security issues without another label >non-issue labels Jun 27, 2024
@elasticsearchmachine elasticsearchmachine added v8.15.0 Team:Security Meta label for security team labels Jun 27, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-security (Team:Security)

@jfreden jfreden added auto-merge Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) test-full-bwc Trigger full BWC version matrix tests labels Jun 27, 2024
@jfreden
Copy link
Contributor Author

jfreden commented Jun 27, 2024

Confirmed locally that this fixes the issue but running full-bwc just in case.

@elasticsearchmachine elasticsearchmachine merged commit cb92193 into elastic:main Jun 27, 2024
15 checks passed
@jfreden jfreden deleted the fix_is_new_index_condition branch June 27, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) >non-issue :Security/Security Security issues without another label Team:Security Meta label for security team test-full-bwc Trigger full BWC version matrix tests v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants