Skip to content

Add refresh .security index call between security migrations #114879

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

Merged
merged 5 commits into from
Nov 5, 2024

Conversation

jfreden
Copy link
Contributor

@jfreden jfreden commented Oct 16, 2024

This PR addresses this issue: #110562

We're now adding more security migrations so we need to make sure that the framework handles migrations that depend on each other properly.

As part of that work we need to make sure that any subsequent migrations following a migration doesn't experience docs version conflicts, outdated docs or that APIs relying on migrated docs temporarily return the wrong results.

The security index currently relies on the index.refresh_interval (defaults to 1s in stateful and 5s in stateless). See this PR: #97815

This adds an explicit refresh before any migrations run and between migrations to make sure the index is refreshed when a migration starts.

@jfreden jfreden force-pushed the improve_sec_migration_framework branch from ec5003c to 127f6d2 Compare October 16, 2024 12:44
@jfreden jfreden marked this pull request as ready for review October 16, 2024 12:44
@jfreden jfreden added the :Security/Security Security issues without another label label Oct 16, 2024
@jfreden jfreden requested a review from n1v0lg October 16, 2024 12:44
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine elasticsearchmachine added the Team:Security Meta label for security team label Oct 16, 2024
@elasticsearchmachine
Copy link
Collaborator

Hi @jfreden, I've created a changelog YAML for you.

@jfreden jfreden requested review from a team as code owners November 4, 2024 13:32
@jfreden jfreden force-pushed the improve_sec_migration_framework branch from 989612f to 42987a6 Compare November 4, 2024 13:34
@jfreden jfreden removed request for a team November 4, 2024 13:36
@jfreden jfreden removed the request for review from a team November 4, 2024 13:36
@jfreden jfreden removed the v8.17.0 label Nov 4, 2024
Copy link
Contributor

@n1v0lg n1v0lg left a comment

Choose a reason for hiding this comment

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

LGTM, pending green CI 👍

@jfreden jfreden merged commit 38c7ddd into elastic:main Nov 5, 2024
21 checks passed
jozala pushed a commit that referenced this pull request Nov 13, 2024
* Add refresh .security index call between security migrations
alexey-ivanov-es pushed a commit to alexey-ivanov-es/elasticsearch that referenced this pull request Nov 28, 2024
…#114879)

* Add refresh .security index call between security migrations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Security/Security Security issues without another label Team:Security Meta label for security team v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants