Preprocessed traces: https://pastila.nl/?0006a09d/f3f1725be8a2ec8787b2d5c8b1eb6532
Report: https://s3.amazonaws.com/clickhouse-test-reports/40506/f2be18b3a644debbb882b8a9e8396b0375461b36/stress_test__undefined_.html
enum class OvercommitResult
{
    NONE,
    DISABLED,
    MEMORY_FREED,
    SELECTED,
    TIMEOUTED,
    NOT_ENOUGH_FREED,
};
enum class QueryCancellationState
{
    NONE     = 0,  
    SELECTED = 1,  
    RUNNING  = 2,  
};
struct OvercommitTracker : boost::noncopyable
{
    OvercommitResult needToStopQuery(MemoryTracker * tracker, Int64 amount);
    void tryContinueQueryExecutionAfterFree(Int64 amount);
    void onQueryStop(MemoryTracker * tracker);
    virtual ~OvercommitTracker() = default;