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>
```
#include "ExternalLoader.h"
#include <mutex>
#include <pcg_random.hpp>
#include <Common/Config/AbstractConfigurationComparison.h>
#include <Common/Exception.h>
#include <Common/StringUtils/StringUtils.h>
#include <Common/ThreadPool.h>
#include <Common/randomSeed.h>
#include <Common/setThreadName.h>
#include <Common/StatusInfo.h>
#include <ext/chrono_io.h>
#include <ext/scope_guard.h>
#include <boost/range/adaptor/map.hpp>
#include <boost/range/algorithm/copy.hpp>
#include <unordered_set>
namespace CurrentStatusInfo
{
    extern const Status DictionaryStatus;
}
namespace DB
{
namespace ErrorCodes
{
    extern const int LOGICAL_ERROR;
    extern const int BAD_ARGUMENTS;
    extern const int DICTIONARIES_WAS_NOT_LOADED;
}
namespace
{
    template <typename ReturnType>