File tree 1 file changed +8
-1
lines changed
test/framework/src/main/java/org/elasticsearch/snapshots 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 34
34
import org .elasticsearch .common .unit .ByteSizeUnit ;
35
35
import org .elasticsearch .common .util .concurrent .EsExecutors ;
36
36
import org .elasticsearch .core .Nullable ;
37
+ import org .elasticsearch .core .UpdateForV9 ;
37
38
import org .elasticsearch .index .IndexVersion ;
38
39
import org .elasticsearch .index .IndexVersions ;
39
40
import org .elasticsearch .plugins .Plugin ;
@@ -365,9 +366,15 @@ protected static Settings.Builder indexSettingsNoReplicas(int shards) {
365
366
/**
366
367
* Randomly write an empty snapshot of an older version to an empty repository to simulate an older repository metadata format.
367
368
*/
369
+ @ UpdateForV9 (owner = UpdateForV9 .Owner .DISTRIBUTED_COORDINATION )
370
+ // 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
368
371
protected void maybeInitWithOldSnapshotVersion (String repoName , Path repoPath ) throws Exception {
369
372
if (randomBoolean () && randomBoolean ()) {
370
- initWithSnapshotVersion (repoName , repoPath , IndexVersionUtils .randomVersion ());
373
+ initWithSnapshotVersion (
374
+ repoName ,
375
+ repoPath ,
376
+ IndexVersionUtils .randomVersionBetween (random (), IndexVersions .MINIMUM_COMPATIBLE , IndexVersions .V_8_9_0 )
377
+ );
371
378
}
372
379
}
373
380
You can’t perform that action at this time.
0 commit comments