Note this failed on a FIPS CI. But I am not sure it is related to FIPS

**Build scan:**
https://gradle-enterprise.elastic.co/s/67tz5rwik3wry/tests/:server:internalClusterTest/org.elasticsearch.snapshots.ConcurrentSnapshotsIT/testConcurrentOperationsLimit

**Reproduction line:**
```
./gradlew ':server:internalClusterTest' --tests "org.elasticsearch.snapshots.ConcurrentSnapshotsIT.testConcurrentOperationsLimit" -Dtests.seed=9645A50DFEC8779B -Dtests.locale=ro-RO -Dtests.timezone=America/Curacao -Druntime.java=20 -Dtests.fips.enabled=true
```

**Applicable branches:**
7.17

**Reproduces locally?:**
Didn't try

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.snapshots.ConcurrentSnapshotsIT&tests.test=testConcurrentOperationsLimit

**Failure excerpt:**
```
java.util.concurrent.ExecutionException: RemoteTransportException[[node_t0][127.0.0.1:23201][cluster:admin/snapshot/create]]; nested: SnapshotException[[test-repo:snap-szxtaaaaqaccoitsaaaaaa-2/lGgpKLshR26zVEt0aeOYzw] failed to update snapshot in repository]; nested: IllegalStateException[Duplicate key index-test (attempted merging values [index-test/2OzWbDLWSGaZuR5_SBztBA] and [index-test/kumAsfLLR9eDZTLLsFbFrw])];

  at __randomizedtesting.SeedInfo.seed([9645A50DFEC8779B:9477D8DEA9D9526B]:0)
  at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.getValue(BaseFuture.java:257)
  at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:244)
  at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:75)
  at org.elasticsearch.snapshots.AbstractSnapshotIntegTestCase.createNSnapshots(AbstractSnapshotIntegTestCase.java:711)
  at org.elasticsearch.snapshots.AbstractSnapshotIntegTestCase.createNSnapshots(AbstractSnapshotIntegTestCase.java:686)
  at org.elasticsearch.snapshots.ConcurrentSnapshotsIT.testConcurrentOperationsLimit(ConcurrentSnapshotsIT.java:1241)
  at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
  at java.lang.reflect.Method.invoke(Method.java:578)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:49)
  at org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:45)
  at org.apache.lucene.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:48)
  at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:64)
  at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:47)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:843)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:490)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
  at org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:45)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:41)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
  at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:47)
  at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:64)
  at org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:54)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
  at java.lang.Thread.run(Thread.java:1623)

  Caused by: org.elasticsearch.transport.RemoteTransportException: [node_t0][127.0.0.1:23201][cluster:admin/snapshot/create]


    Caused by: org.elasticsearch.snapshots.SnapshotException: [test-repo:snap-szxtaaaaqaccoitsaaaaaa-2/lGgpKLshR26zVEt0aeOYzw] failed to update snapshot in repository

      at org.elasticsearch.repositories.blobstore.BlobStoreRepository.lambda$finalizeSnapshot$43(BlobStoreRepository.java:1387)
      at org.elasticsearch.action.ActionListener$1.onFailure(ActionListener.java:144)
      at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:138)
      at org.elasticsearch.action.support.GroupedActionListener.onResponse(GroupedActionListener.java:55)
      at org.elasticsearch.action.ActionRunnable$1.doRun(ActionRunnable.java:35)
      at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:777)
      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:1623)

      Caused by: java.lang.IllegalStateException: Duplicate key index-test (attempted merging values [index-test/2OzWbDLWSGaZuR5_SBztBA] and [index-test/kumAsfLLR9eDZTLLsFbFrw])

        at java.util.stream.Collectors.duplicateKeyException(Collectors.java:135)
        at java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:182)
        at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
        at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1715)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
        at org.elasticsearch.repositories.RepositoryData.<init>(RepositoryData.java:141)
        at org.elasticsearch.repositories.RepositoryData.addSnapshot(RepositoryData.java:431)
        at org.elasticsearch.repositories.blobstore.BlobStoreRepository.lambda$finalizeSnapshot$45(BlobStoreRepository.java:1433)
        at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:136)
        at org.elasticsearch.action.support.GroupedActionListener.onResponse(GroupedActionListener.java:55)
        at org.elasticsearch.action.ActionRunnable$1.doRun(ActionRunnable.java:35)
        at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:777)
        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:1623)

```
server/src/main/java/org/elasticsearch/repositories/ShardGenerations.java
return generations.get(shardId);
    }
    public List<ShardGeneration> getGens(IndexId indexId) {
        return shardGenerations.getOrDefault(indexId, Collections.emptyList());
    }
    @Override
    public boolean equals(final Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final ShardGenerations that = (ShardGenerations) o;
        return shardGenerations.equals(that.shardGenerations);
    }
    @Override
    public int hashCode() {
        return Objects.hash(shardGenerations);
    }
    @Override
    public String toString() {
        return "ShardGenerations{generations:" + this.shardGenerations + "}";
    }
    public static Builder builder() {
        return new Builder();
    }
    public static final class Builder {
        private final Map<IndexId, Map<Integer, ShardGeneration>> generations = new HashMap<>();
        /**