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>
```
throw Exception("No object created and no exception raised for " + type_name, ErrorCodes::LOGICAL_ERROR);
            
            {
                LoadingGuardForAsyncLoad lock(async, mutex);
                saveResultOfLoadingSingleObject(name, loading_id, info->object, new_object, new_exception, info->error_count, lock);
                finishLoadingSingleObject(name, loading_id, lock);
            }
            event.notify_all();
        }
        catch (...)
        {
            LoadingGuardForAsyncLoad lock(async, mutex);
            finishLoadingSingleObject(name, loading_id, lock);
            throw;
        }
    }
    
    std::optional<Info> prepareToLoadSingleObject(
        const String & name, size_t loading_id, size_t min_id_to_finish_loading_dependencies_, const LoadingGuardForAsyncLoad &)
    {
        Info * info = getInfo(name);
        
        
        if (!info || !info->isLoading() || (info->loading_id != loading_id))
            return {};
        min_id_to_finish_loading_dependencies[std::this_thread::get_id()] = min_id_to_finish_loading_dependencies_;
        return *info;
    }
    
    std::pair<LoadablePtr, std::exception_ptr>