Skip to content

Commit

Permalink
Fix broken test caused by setting old write index to read-only verifi…
Browse files Browse the repository at this point in the history
…ed (#123190)

#122887 set read-only on the source indices of a data stream reindex. To test behavior when the source index was already read-only, testDataStreamUpgrade sometimes set the old write index to read-only. But the rest end point for adding a read-only block always sets verifed-read-only. This caused the old write index to not need to be upgraded, resulting in an incorrect value for total_indices_requiring_upgrade
  • Loading branch information
parkertimmins authored Feb 22, 2025
1 parent 7cbd305 commit 8b25a72
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 1 addition & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,6 @@ tests:
- class: org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT
method: testStopQueryLocal
issue: https://github.com/elastic/elasticsearch/issues/121672
- class: org.elasticsearch.upgrades.DataStreamsUpgradeIT
method: testUpgradeDataStream
issue: https://github.com/elastic/elasticsearch/issues/123189
- class: org.elasticsearch.smoketest.DocsClientYamlTestSuiteIT
method: test {yaml=reference/snapshot-restore/restore-snapshot/line_408}
issue: https://github.com/elastic/elasticsearch/issues/123192
Expand All @@ -348,6 +345,7 @@ tests:
method: testHistoryIsWrittenWithFailure
issue: https://github.com/elastic/elasticsearch/issues/123203


# Examples:
#
# Mute a single test case in a YAML test suite:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,6 @@ private void upgradeDataStream(String dataStreamName, int numRolloversOnOldClust
if (randomBoolean()) {
closeIndex(oldIndexName);
}
if (randomBoolean()) {
assertOK(client().performRequest(new Request("PUT", oldIndexName + "/_block/read_only")));
}
}
Request reindexRequest = new Request("POST", "/_migration/reindex");
reindexRequest.setJsonEntity(Strings.format("""
Expand Down

0 comments on commit 8b25a72

Please sign in to comment.