Skip to content

Commit

Permalink
Revert "[test] Dynamically pick up the upper bound snapshot index ver…
Browse files Browse the repository at this point in the history
…sion (#1…" (elastic#115827)

This reverts commit 32dee6a.
  • Loading branch information
arteam authored Oct 29, 2024
1 parent c9a9894 commit 7feb4d5
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.elasticsearch.common.unit.ByteSizeUnit;
import org.elasticsearch.common.util.concurrent.EsExecutors;
import org.elasticsearch.core.Nullable;
import org.elasticsearch.core.UpdateForV9;
import org.elasticsearch.index.IndexVersion;
import org.elasticsearch.index.IndexVersions;
import org.elasticsearch.plugins.Plugin;
Expand Down Expand Up @@ -365,9 +366,15 @@ protected static Settings.Builder indexSettingsNoReplicas(int shards) {
/**
* Randomly write an empty snapshot of an older version to an empty repository to simulate an older repository metadata format.
*/
@UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION)
// This used to pick an index version from 7.0.0 to 8.9.0. The minimum now is 8.0.0 but it's not clear what the upper range should be
protected void maybeInitWithOldSnapshotVersion(String repoName, Path repoPath) throws Exception {
if (randomBoolean() && randomBoolean()) {
initWithSnapshotVersion(repoName, repoPath, IndexVersionUtils.randomVersion());
initWithSnapshotVersion(
repoName,
repoPath,
IndexVersionUtils.randomVersionBetween(random(), IndexVersions.MINIMUM_COMPATIBLE, IndexVersions.V_8_9_0)
);
}
}

Expand Down

0 comments on commit 7feb4d5

Please sign in to comment.