Preprocessed traces: https://pastila.nl/?0006a09d/f3f1725be8a2ec8787b2d5c8b1eb6532
Report: https://s3.amazonaws.com/clickhouse-test-reports/40506/f2be18b3a644debbb882b8a9e8396b0375461b36/stress_test__undefined_.html
bool still_need = !(id < id_to_release); 
    
    
    if (allow_release && required_memory <= freed_memory && still_need)
        releaseThreads();
    
    
    if (required_memory == 0 && cancellation_state == QueryCancellationState::SELECTED)
        reset();
    if (timeout)
        return OvercommitResult::TIMEOUTED;
    if (still_need)
        return OvercommitResult::NOT_ENOUGH_FREED;
    else
        return OvercommitResult::MEMORY_FREED;
}
void OvercommitTracker::tryContinueQueryExecutionAfterFree(Int64 amount)
{
    DENY_ALLOCATIONS_IN_SCOPE;
    if (OvercommitTrackerBlockerInThread::isBlocked())
        return;
    std::lock_guard guard(overcommit_m);
    if (cancellation_state != QueryCancellationState::NONE)
    {
        freed_memory += amount;
        if (freed_memory >= required_memory)
            releaseThreads();
    }
}
void OvercommitTracker::onQueryStop(MemoryTracker * tracker)