Skip to content

Use latch to speedup multi feature migration test (#84007) #84070

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

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Feb 16, 2022

The multi feature migration test works by having two system index
features that are to be upgraded. The reindexing of the system indices
of those features is done in sequence by the system index migrator, and
the test has an assertBusy that waits for all the migrations to
complete. Unfortunately assertBusy backs off exponentially, so it isn't
great for quickly resuming the test once the underlying assertion
becomes true, since the condition might change shortly after an
iteration, and then have to wait for a long backoff.

This commit adds a latch which will count down all the executions of the
test plugins, so that the assert busy will not be run until after all
the indexes have migrated.

closes #83953

The multi feature migration test works by having two system index
features that are to be upgraded. The reindexing of the system indices
of those features is done in sequence by the system index migrator, and
the test has an assertBusy that waits for all the migrations to
complete. Unfortunately assertBusy backs off exponentially, so it isn't
great for quickly resuming the test once the underlying assertion
becomes true, since the condition might change shortly after an
iteration, and then have to wait for a long backoff.

This commit adds a latch which will count down all the executions of the
test plugins, so that the assert busy will not be run until after all
the indexes have migrated.

closes elastic#83953
@rjernst rjernst added backport auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) labels Feb 16, 2022
@elasticsearchmachine elasticsearchmachine merged commit a5c3b35 into elastic:7.17 Feb 17, 2022
@rjernst rjernst deleted the feature_migration_it_7.17 branch February 17, 2022 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport v7.17.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants