An incomplete shard snapshot will prevent a shard from moving away from a node (see `SnapshotInProgressAllocationDecider`). That means that when a shard snapshot completes it may become possible to perform some shard movements that previously were not possible, so we should trigger a reroute to start those movements. AFAICT we do not trigger such a reroute today.
server/src/test/java/org/elasticsearch/snapshots/SnapshotsServiceTests.java
ActionListener.running(() -> fail("should not complete publication"))
        );
    }
    private static ClusterState stateWithUnassignedIndices(String... indexNames) {
        final Metadata.Builder metaBuilder = Metadata.builder(Metadata.EMPTY_METADATA);
        for (String index : indexNames) {
            metaBuilder.put(
                IndexMetadata.builder(index)
                    .settings(Settings.builder().put(SETTING_VERSION_CREATED, IndexVersion.current()))
                    .numberOfShards(1)
                    .numberOfReplicas(0)
                    .build(),
                false
            );
        }
        final RoutingTable.Builder routingTable = RoutingTable.builder();
        for (String index : indexNames) {
            final Index idx = metaBuilder.get(index).getIndex();
            final ShardId shardId = new ShardId(idx, 0);
            routingTable.add(
                IndexRoutingTable.builder(idx)
                    .addIndexShard(
                        IndexShardRoutingTable.builder(shardId)
                            .addShard(
                                ShardRouting.newUnassigned(
                                    shardId,
                                    true,
                                    RecoverySource.EmptyStoreRecoverySource.INSTANCE,
                                    new UnassignedInfo(UnassignedInfo.Reason.INDEX_CREATED, "test"),
                                    ShardRouting.Role.DEFAULT