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>
```
{
        for (auto loading_id : recently_finished_loadings)
        {
            auto it = loading_threads.find(loading_id);
            if (it != loading_threads.end())
            {
                auto thread = std::move(it->second);
                loading_threads.erase(it);
                thread.join(); 
            }
        }
        recently_finished_loadings.clear();
    }
    static void cancelLoading(Info & info)
    {
        if (!info.isLoading())
            return;
        
        
        info.loading_id = info.state_id;
        info.loading_end_time = std::chrono::system_clock::now();
    }
    
    void doLoading(const String & name, size_t loading_id, bool forced_to_reload, size_t min_id_to_finish_loading_dependencies_, bool async)