**Build scan:**
https://gradle-enterprise.elastic.co/s/r727kot4zv3qm/tests/:modules:data-streams:internalClusterTest/org.elasticsearch.datastreams.TSDBIndexingIT/testTimeRanges

**Reproduction line:**
```
./gradlew ':modules:data-streams:internalClusterTest' --tests "org.elasticsearch.datastreams.TSDBIndexingIT.testTimeRanges" -Dtests.seed=2DDC294DD605AC70 -Dtests.locale=de -Dtests.timezone=America/Argentina/La_Rioja -Druntime.java=19
```

**Applicable branches:**
main

**Reproduces locally?:**
No

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.datastreams.TSDBIndexingIT&tests.test=testTimeRanges

**Failure excerpt:**
```
org.elasticsearch.index.mapper.MapperParsingException: failed to parse

  at __randomizedtesting.SeedInfo.seed([2DDC294DD605AC70:EB774AA41A1D47C2]:0)
  at org.elasticsearch.index.mapper.DocumentParser.wrapInMapperParsingException(DocumentParser.java:212)
  at org.elasticsearch.index.mapper.DocumentParser.parseDocument(DocumentParser.java:70)
  at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:78)
  at org.elasticsearch.index.shard.IndexShard.prepareIndex(IndexShard.java:1021)
  at org.elasticsearch.index.shard.IndexShard.applyIndexOperation(IndexShard.java:969)
  at org.elasticsearch.index.shard.IndexShard.applyIndexOperationOnPrimary(IndexShard.java:913)
  at org.elasticsearch.action.bulk.TransportShardBulkAction.executeBulkItemRequest(TransportShardBulkAction.java:354)
  at org.elasticsearch.action.bulk.TransportShardBulkAction$2.doRun(TransportShardBulkAction.java:219)
  at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
  at org.elasticsearch.action.bulk.TransportShardBulkAction.performOnPrimary(TransportShardBulkAction.java:286)
  at org.elasticsearch.action.bulk.TransportShardBulkAction.dispatchedShardOperationOnPrimary(TransportShardBulkAction.java:137)
  at org.elasticsearch.action.bulk.TransportShardBulkAction.dispatchedShardOperationOnPrimary(TransportShardBulkAction.java:74)
  at org.elasticsearch.action.support.replication.TransportWriteAction$1.doRun(TransportWriteAction.java:214)
  at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:958)
  at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
  at java.lang.Thread.run(Thread.java:1589)

  Caused by: java.lang.IllegalArgumentException: time series index @timestamp value [2023-03-10T17:05:54.863Z] must be smaller than 2023-03-10T17:05:54.359Z

    at org.elasticsearch.index.mapper.DataStreamTimestampFieldMapper.validateTimestamp(DataStreamTimestampFieldMapper.java:258)
    at org.elasticsearch.index.mapper.DataStreamTimestampFieldMapper.postParse(DataStreamTimestampFieldMapper.java:223)
    at org.elasticsearch.index.mapper.DocumentParser.internalParseDocument(DocumentParser.java:114)
    at org.elasticsearch.index.mapper.DocumentParser.parseDocument(DocumentParser.java:67)
    at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:78)
    at org.elasticsearch.index.shard.IndexShard.prepareIndex(IndexShard.java:1021)
    at org.elasticsearch.index.shard.IndexShard.applyIndexOperation(IndexShard.java:969)
    at org.elasticsearch.index.shard.IndexShard.applyIndexOperationOnPrimary(IndexShard.java:913)
    at org.elasticsearch.action.bulk.TransportShardBulkAction.executeBulkItemRequest(TransportShardBulkAction.java:354)
    at org.elasticsearch.action.bulk.TransportShardBulkAction$2.doRun(TransportShardBulkAction.java:219)
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
    at org.elasticsearch.action.bulk.TransportShardBulkAction.performOnPrimary(TransportShardBulkAction.java:286)
    at org.elasticsearch.action.bulk.TransportShardBulkAction.dispatchedShardOperationOnPrimary(TransportShardBulkAction.java:137)
    at org.elasticsearch.action.bulk.TransportShardBulkAction.dispatchedShardOperationOnPrimary(TransportShardBulkAction.java:74)
    at org.elasticsearch.action.support.replication.TransportWriteAction$1.doRun(TransportWriteAction.java:214)
    at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:958)
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.lang.Thread.run(Thread.java:1589)

```
server/src/main/java/org/elasticsearch/cluster/metadata/DataStream.java
List<Index> backingIndices = new ArrayList<>(indices);
        backingIndices.add(0, index);
        assert backingIndices.size() == indices.size() + 1;
        return new DataStream(
            name,
            backingIndices,
            generation + 1,
            metadata,
            hidden,
            replicated,
            system,
            allowCustomRouting,
            indexMode,
            lifecycle
        );
    }
    public DataStream promoteDataStream() {
        return new DataStream(
            name,
            indices,
            getGeneration(),
            metadata,
            hidden,
            false,
            system,
            timeProvider,
            allowCustomRouting,
            indexMode,
            lifecycle
        );