### CI Link

https://gradle-enterprise.elastic.co/s/oyi6h23yl6k3o/tests/:x-pack:qa:full-cluster-restart:v8.11.0%23bwcTest/org.elasticsearch.xpack.restart.CoreFullClusterRestartIT/testClusterState%20%7Bcluster=OLD%7D

### Repro line

./gradlew ':qa:full-cluster-restart:v8.11.0#bwcTest' -Dtests.class="org.elasticsearch.upgrades.FullClusterRestartIT"

### Does it reproduce?

Yes

### Applicable branches

main

### Failure history

_No response_

### Failure excerpt

This test assumes that the index created version in cluster state matches the old node version.

That is no longer true due to the introduction of `IndexVersion`

https://github.com/elastic/elasticsearch/blob/52a6820813577abcb23191d862a01e32e652ed42/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartIT.java#L435-L440
qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartIT.java
assumeTrue("indexing time series indices changed in 8.2.0", getOldClusterVersion().onOrAfter(Version.V_8_2_0));
        int numDocs;
        if (isRunningAgainstOldCluster()) {
            numDocs = createTimeSeriesModeIndex(1);
        } else {
            numDocs = countOfIndexedRandomDocuments();
        }
        assertCountAll(numDocs);
        Request request = new Request("GET", "/" + index + "/_search");
        XContentBuilder body = jsonBuilder().startObject();
        body.field("size", 0);
        body.startObject("aggs").startObject("check").startObject("scripted_metric");
        {
            body.field("init_script", "state.timeSeries = new HashSet()");
            body.field("map_script", "state.timeSeries.add(doc['dim'].value)");
            body.field("combine_script", "return state.timeSeries");
            StringBuilder reduceScript = new StringBuilder();
            reduceScript.append("Set timeSeries = new TreeSet();");
            reduceScript.append("for (s in states) {");
            reduceScript.append("  for (ts in s) {");
            reduceScript.append("    boolean newTs = timeSeries.add(ts);");
            reduceScript.append("    if (false == newTs) {");
            reduceScript.append("      throw new IllegalArgumentException(ts + ' appeared in two shards');");
            reduceScript.append("    }");
            reduceScript.append("  }");
            reduceScript.append("}");
            reduceScript.append("return timeSeries;");
            body.field("reduce_script", reduceScript.toString());
        }
        body.endObject().endObject().endObject();