As the title says. These tasks should be batched because they can arise from ILM actions.

Relates #77466
server/src/test/java/org/elasticsearch/cluster/metadata/MetadataIndexAliasesServiceTests.java
before,
            Arrays.asList(new AliasAction.RemoveIndex("test"), new AliasAction.RemoveIndex("test"))
        );
        assertNull(after.metadata().getIndicesLookup().get("test"));
    }
    public void testAddWriteOnlyWithNoExistingAliases() {
        ClusterState before = createIndex(ClusterState.builder(ClusterName.DEFAULT).build(), "test");
        ClusterState after = service.applyAliasActions(
            before,
            Arrays.asList(new AliasAction.Add("test", "alias", null, null, null, false, null))
        );
        assertFalse(after.metadata().index("test").getAliases().get("alias").writeIndex());
        assertNull(after.metadata().getIndicesLookup().get("alias").getWriteIndex());
        assertAliasesVersionIncreased("test", before, after);
        after = service.applyAliasActions(before, Arrays.asList(new AliasAction.Add("test", "alias", null, null, null, null, null)));
        assertNull(after.metadata().index("test").getAliases().get("alias").writeIndex());
        assertThat(
            after.metadata().index(after.metadata().getIndicesLookup().get("alias").getWriteIndex()),
            equalTo(after.metadata().index("test"))
        );
        assertAliasesVersionIncreased("test", before, after);
        after = service.applyAliasActions(before, Arrays.asList(new AliasAction.Add("test", "alias", null, null, null, true, null)));
        assertTrue(after.metadata().index("test").getAliases().get("alias").writeIndex());
        assertThat(
            after.metadata().index(after.metadata().getIndicesLookup().get("alias").getWriteIndex()),
            equalTo(after.metadata().index("test"))
        );
        assertAliasesVersionIncreased("test", before, after);
    }
    public void testAddWriteOnlyWithExistingWriteIndex() {