Currently when the ilm rollup step is being retried the same target index is being used. This can cause the subsequent downsample api invocation to index rolled up data into shards of the target index that already exists and while the previous downsample api invocation is still partially running (and also rolling up data into the same target shard).

Note that, the rollup step may fail in case a cluster is being restarted in a rolling manner (for example for an upgrade) or when the elected master node fails (the downsample action is coordinated from the elected master node).

The fix would be that the `RollupStep` isn't retried on its own incase it fails to execute, but that the step that generates the target index name for downsampling is retried first and then the rollup step.

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/DownsampleActionTests.java
return new DownsampleAction(ConfigTestHelpers.randomInterval());
    }
    @Override
    protected DownsampleAction doParseInstance(XContentParser parser) {
        return DownsampleAction.parse(parser);
    }
    @Override
    protected DownsampleAction createTestInstance() {
        return randomInstance();
    }
    @Override
    protected DownsampleAction mutateInstance(DownsampleAction instance) {
        return null;
    }
    @Override
    protected Reader<DownsampleAction> instanceReader() {
        return DownsampleAction::new;
    }
    @Override
    public boolean isSafeAction() {
        return false;
    }
    @Override
    public void testToSteps() {
        DownsampleAction action = new DownsampleAction(ConfigTestHelpers.randomInterval());
        String phase = randomAlphaOfLengthBetween(1, 10);
        StepKey nextStepKey = new StepKey(
            randomAlphaOfLengthBetween(1, 10),
            randomAlphaOfLengthBetween(1, 10),
            randomAlphaOfLengthBetween(1, 10)