-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Fix: ILMDownsampleDisruptionIT.testILMDownsampleRollingRestart #137423
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
Changes from 5 commits
434bb0a
ebd8b9e
432f2c5
4037236
5bbc396
5b8e503
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,6 @@ | |
| import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval; | ||
| import org.elasticsearch.test.ESIntegTestCase; | ||
| import org.elasticsearch.test.InternalTestCluster; | ||
| import org.elasticsearch.test.junit.annotations.TestIssueLogging; | ||
| import org.elasticsearch.xcontent.XContentBuilder; | ||
| import org.elasticsearch.xcontent.XContentFactory; | ||
| import org.elasticsearch.xpack.aggregatemetric.AggregateMetricMapperPlugin; | ||
|
|
@@ -34,6 +33,7 @@ | |
| import org.elasticsearch.xpack.core.ilm.LifecyclePolicy; | ||
| import org.elasticsearch.xpack.core.ilm.LifecycleSettings; | ||
| import org.elasticsearch.xpack.core.ilm.Phase; | ||
| import org.elasticsearch.xpack.core.ilm.PhaseCompleteStep; | ||
| import org.elasticsearch.xpack.core.ilm.action.ILMActions; | ||
| import org.elasticsearch.xpack.core.ilm.action.PutLifecycleRequest; | ||
| import org.elasticsearch.xpack.ilm.IndexLifecycle; | ||
|
|
@@ -48,6 +48,7 @@ | |
| import java.util.List; | ||
| import java.util.Locale; | ||
| import java.util.Map; | ||
| import java.util.Objects; | ||
| import java.util.concurrent.TimeUnit; | ||
| import java.util.function.Supplier; | ||
|
|
||
|
|
@@ -130,10 +131,6 @@ public void setup(final String sourceIndex, int numOfShards, int numOfReplicas, | |
| assertAcked(client().execute(ILMActions.PUT, putLifecycleRequest).actionGet()); | ||
| } | ||
|
|
||
| @TestIssueLogging( | ||
| value = "org.elasticsearch.cluster.service.MasterService:TRACE", | ||
| issueUrl = "https://github.com/elastic/elasticsearch/issues/136585" | ||
| ) | ||
| public void testILMDownsampleRollingRestart() throws Exception { | ||
| final InternalTestCluster cluster = internalCluster(); | ||
| cluster.startMasterOnlyNodes(1); | ||
|
|
@@ -172,6 +169,13 @@ public void testILMDownsampleRollingRestart() throws Exception { | |
| startDownsampleTaskViaIlm(sourceIndex, targetIndex); | ||
| assertBusy(() -> assertTargetIndex(cluster, targetIndex, indexedDocs)); | ||
| ensureGreen(targetIndex); | ||
| // We assert that ILM successfully completed the phase | ||
| logger.info("Waiting for ILM to complete the phase for index [{}]", targetIndex); | ||
| awaitClusterState(clusterState -> { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ohh yes I'd completely forgotten we had an
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Me too, credits to @nielsbauman
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have less of an excuse tho 😇 |
||
| IndexMetadata indexMetadata = clusterState.metadata().getProject().index(targetIndex); | ||
| return indexMetadata.getLifecycleExecutionState() != null | ||
| && Objects.equals(indexMetadata.getLifecycleExecutionState().step(), PhaseCompleteStep.NAME); | ||
| }); | ||
| } | ||
|
|
||
| private void startDownsampleTaskViaIlm(String sourceIndex, String targetIndex) throws Exception { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.