Hello,

so I'm working to integrate CatBoost model with our ClickHouse cluster. It appears that, whenever we create a new XML model file in the configured path, the **first** call to the new model never returns (this is true both of the HTTP interface as well as via clickhouse-client).

Independently from whether the locked statement gets cancelled, subsequent calls succeed immediately.

```
16e8bdb5bbb9 :) select version();

SELECT version()

┌─version()─┐
│ 20.6.3.28 │
└───────────┘

1 rows in set. Elapsed: 0.006 sec.
```

Is this known behavior? If it helps, my models look like this:

```
<models>
    <model>
        <type>catboost</type>
        <name>ctr_predictor</name>
        <path>/catboost/my_predictor</path>
        <lifetime>0</lifetime>
    </model>
</models>
```
{
        std::optional<size_t> min_id;
        auto pred = [&]
        {
            if (!min_id)
                min_id = getMinIDToFinishLoading(forced_to_reload);
            bool all_ready = true;
            for (auto & [name, info] : infos)
            {
                if (filter && !filter(name))
                    continue;
                if (info.state_id >= min_id)
                    continue;
                all_ready = false;
                if (info.loading_id < min_id)
                    startLoading(info, forced_to_reload, *min_id);
            }
            return all_ready;
        };
        if (timeout == WAIT)
            event.wait(lock, pred);
        else
            event.wait_for(lock, timeout, pred);
    }
    
    size_t getMinIDToFinishLoading(bool forced_to_reload) const