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) (#123209)

#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

(cherry picked from commit 8b25a72)

# Conflicts:
#	muted-tests.yml
  • Loading branch information
parkertimmins authored Feb 22, 2025
1 parent e341735 commit fef75ac
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,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 fef75ac

Please sign in to comment.