Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,6 @@ tests:
- class: org.elasticsearch.search.profile.dfs.DfsProfilerIT
method: testProfileDfs
issue: https://github.com/elastic/elasticsearch/issues/119711
- class: org.elasticsearch.upgrades.DataStreamsUpgradeIT
method: testUpgradeDataStream
issue: https://github.com/elastic/elasticsearch/issues/119717
- class: org.elasticsearch.xpack.esql.optimizer.LocalPhysicalPlanOptimizerTests
method: testSingleMatchFunctionFilterPushdownWithStringValues {default}
issue: https://github.com/elastic/elasticsearch/issues/119720
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,18 +281,22 @@ private void upgradeDataStream(String dataStreamName, int numRolloversOnOldClust
);
assertOK(statusResponse);
assertThat(statusResponseMap.get("complete"), equalTo(true));
// The number of rollovers that will have happened when we call reindex:
final int rolloversPerformedByReindex = explicitRolloverOnNewClusterCount == 0 ? 1 : 0;
final int originalWriteIndex = 1;
assertThat(
statusResponseMap.get("total_indices_in_data_stream"),
equalTo(originalWriteIndex + numRolloversOnOldCluster + explicitRolloverOnNewClusterCount + rolloversPerformedByReindex)
);
if (isOriginalClusterSameMajorVersionAsCurrent()) {
assertThat(
statusResponseMap.get("total_indices_in_data_stream"),
equalTo(originalWriteIndex + numRolloversOnOldCluster + explicitRolloverOnNewClusterCount)
);
// If the original cluster was the same as this one, we don't want any indices reindexed:
assertThat(statusResponseMap.get("total_indices_requiring_upgrade"), equalTo(0));
assertThat(statusResponseMap.get("successes"), equalTo(0));
} else {
// The number of rollovers that will have happened when we call reindex:
final int rolloversPerformedByReindex = explicitRolloverOnNewClusterCount == 0 ? 1 : 0;
assertThat(
statusResponseMap.get("total_indices_in_data_stream"),
equalTo(originalWriteIndex + numRolloversOnOldCluster + explicitRolloverOnNewClusterCount + rolloversPerformedByReindex)
);
/*
* total_indices_requiring_upgrade is made up of: (the original write index) + numRolloversOnOldCluster. The number of
* rollovers on the upgraded cluster is irrelevant since those will not be reindexed.
Expand Down