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. - 

size_t sum_marks = candidate.merge_tree_data_select_projection_cache->sum_marks;
    if (normal_parts.empty())
    {
        /
        /
        candidate.complete = true;
    }
    else
    {
        reader.readFromParts(
            normal_parts,
            required_columns,
            metadata_snapshot,
            metadata_snapshot,
            query_info, /
            query_context,
            0, /
            settings.max_threads,
            max_added_blocks,
            candidate.merge_tree_data_select_base_cache.get());
        sum_marks += candidate.merge_tree_data_select_base_cache->sum_marks;
    }
    /
    if (sum_marks < min_sum_marks)
    {
        selected_candidate = &candidate;
        min_sum_marks = sum_marks;
    }
}
bool MergeTreeData::getQueryProcessingStageWithAggregateProjection(