Symptoms: all threads in BackgroundScheduledPool busy, lot of tasks in replication queue, none of the tasks is executing. 

![Screenshot from 2021-04-16 16-21-44_](https://user-images.githubusercontent.com/1549571/115193796-e767d600-a0ec-11eb-887c-5c9c2412e50c.png)

Related to #16895

Possible workarounds (poor options): increasing the background_schedule_pool_size to huge values, or restart server every time when that happens etc. - 

{
    std::lock_guard lock(data.moving_parts_mutex);
    for (const auto & moving_part : parts_to_move)
    {
        /
        if (!data.currently_moving_parts.count(moving_part.part))
            std::terminate();
        data.currently_moving_parts.erase(moving_part.part);
    }
}
std::optional<JobAndPool> MergeTreeData::getDataMovingJob()
{
    if (parts_mover.moves_blocker.isCancelled())
        return {};
    auto moving_tagger = selectPartsForMove();
    if (moving_tagger->parts_to_move.empty())
        return {};
    return JobAndPool{[this, moving_tagger] () mutable
    {
        return moveParts(moving_tagger);
    }, PoolType::MOVE};
}
bool MergeTreeData::areBackgroundMovesNeeded() const
{
    auto policy = getStoragePolicy();
    if (policy->getVolumes().size() > 1)
        return true;
    return policy->getVolumes().size() == 1 && policy->getVolumes()[0]->getDisks().size() > 1;
}
bool MergeTreeData::movePartsToSpace(const DataPartsVector & parts, SpacePtr space)