```
create table t on cluster test_cluster_two_shards (a int) engine Log;



2020.07.23 19:43:32.389299 [ 962934 ] {c701c43a-d4b0-49aa-8b11-b873bd5f3bfa} <Error> : Logical error: 'DDL background thread is not initialized.'.
clickhouse-server: /home/akuzm/ch4/ch/src/Common/Exception.cpp:45: DB::Exception::Exception(const std::string &, int): Assertion `false' failed.
2020.07.23 19:43:32.389681 [ 962870 ] {} <Trace> BaseDaemon: Received signal 6
2020.07.23 19:43:32.390070 [ 962961 ] {} <Fatal> BaseDaemon: ########################################
2020.07.23 19:43:32.390619 [ 962961 ] {} <Fatal> BaseDaemon: (version 20.7.1.1, build id: 21B0DCC47427FD8E) (from thread 962934) (query_id: c701c43a-d4b0-49aa-8b11-b873bd5f3bfa) Received signal Aborted (6)
2020.07.23 19:43:32.390743 [ 962961 ] {} <Fatal> BaseDaemon: 
2020.07.23 19:43:32.390898 [ 962961 ] {} <Fatal> BaseDaemon: Stack trace: 0x7f7f3188918b 0x7f7f31868859 0x7f7f31868729 0x7f7f31879f36 0x7f7f357b63a5 0x7f7f24b19182 0x7f7f24b88925 0x7f7f24fc4bb0 0x7f7f253eac63 0x7f7f253e9c5a 0x7f7f21971864 0x7f7f21978dd8 0x7f7f32a51d7c 0x7f7f32a5258a 0x7f7f32563173 0x7f7f3256003d 0x7f7f3255eeba 0x7f7f316cf609 0x7f7f31965103
2020.07.23 19:43:32.391250 [ 962961 ] {} <Fatal> BaseDaemon: 4. /build/glibc-YYA7BZ/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51: gsignal @ 0x4618b in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so
2020.07.23 19:43:32.391420 [ 962961 ] {} <Fatal> BaseDaemon: 5. /build/glibc-YYA7BZ/glibc-2.31/stdlib/abort.c:81: abort @ 0x25859 in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so
2020.07.23 19:43:32.391638 [ 962961 ] {} <Fatal> BaseDaemon: 6. /build/glibc-YYA7BZ/glibc-2.31/intl/loadmsgcat.c:509: _nl_load_domain.cold @ 0x25729 in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so
2020.07.23 19:43:32.391909 [ 962961 ] {} <Fatal> BaseDaemon: 7. ? @ 0x36f36 in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so
2020.07.23 19:43:32.392220 [ 962961 ] {} <Fatal> BaseDaemon: 8. /home/akuzm/ch4/ch/src/Common/Exception.cpp:48: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x2a23a5 in /home/akuzm/ch4/build-clang10/src/libclickhouse_common_iod.so
2020.07.23 19:43:32.392954 [ 962961 ] {} <Fatal> BaseDaemon: 9. /home/akuzm/ch4/ch/src/Interpreters/Context.cpp:1436: DB::Context::getDDLWorker() const @ 0x10d5182 in /home/akuzm/ch4/build-clang10/src/libclickhouse_interpretersd.so
2020.07.23 19:43:32.393839 [ 962961 ] {} <Fatal> BaseDaemon: 10. /home/akuzm/ch4/ch/src/Interpreters/DDLWorker.cpp:1309: DB::executeDDLQueryOnCluster(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, DB::AccessRightsElements&&, bool) @ 0x1144925 in /home/akuzm/ch4/build-clang10/src/libclickhouse_interpretersd.so
2020.07.23 19:43:32.395238 [ 962961 ] {} <Fatal> BaseDaemon: 11. /home/akuzm/ch4/ch/src/Interpreters/InterpreterCreateQuery.cpp:780: DB::InterpreterCreateQuery::execute() @ 0x1580bb0 in /home/akuzm/ch4/build-clang10/src/libclickhouse_interpretersd.so
2020.07.23 19:43:32.398649 [ 962961 ] {} <Fatal> BaseDaemon: 12. /home/akuzm/ch4/ch/src/Interpreters/executeQuery.cpp:386: DB::executeQueryImpl(char const*, char const*, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool, DB::ReadBuffer*) @ 0x19a6c63 in /home/akuzm/ch4/build-clang10/src/libclickhouse_interpretersd.so
2020.07.23 19:43:32.402023 [ 962961 ] {} <Fatal> BaseDaemon: 13. /home/akuzm/ch4/ch/src/Interpreters/executeQuery.cpp:655: DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool) @ 0x19a5c5a in /home/akuzm/ch4/build-clang10/src/libclickhouse_interpretersd.so
2020.07.23 19:43:32.402655 [ 962961 ] {} <Fatal> BaseDaemon: 14. /home/akuzm/ch4/ch/src/Server/TCPHandler.cpp:253: DB::TCPHandler::runImpl() @ 0x36a864 in /home/akuzm/ch4/build-clang10/src/libclickhouse_serverd.so
2020.07.23 19:43:32.403283 [ 962961 ] {} <Fatal> BaseDaemon: 15. /home/akuzm/ch4/ch/src/Server/TCPHandler.cpp:1213: DB::TCPHandler::run() @ 0x371dd8 in /home/akuzm/ch4/build-clang10/src/libclickhouse_serverd.so
2020.07.23 19:43:32.403773 [ 962961 ] {} <Fatal> BaseDaemon: 16. /home/akuzm/ch4/ch/contrib/poco/Net/src/TCPServerConnection.cpp:43: Poco::Net::TCPServerConnection::start() @ 0x1b9d7c in /home/akuzm/ch4/build-clang10/contrib/poco-cmake/Net/lib_poco_netd.so
2020.07.23 19:43:32.404200 [ 962961 ] {} <Fatal> BaseDaemon: 17. /home/akuzm/ch4/ch/contrib/poco/Net/src/TCPServerDispatcher.cpp:114: Poco::Net::TCPServerDispatcher::run() @ 0x1ba58a in /home/akuzm/ch4/build-clang10/contrib/poco-cmake/Net/lib_poco_netd.so
2020.07.23 19:43:32.404674 [ 962961 ] {} <Fatal> BaseDaemon: 18. /home/akuzm/ch4/ch/contrib/poco/Foundation/src/ThreadPool.cpp:199: Poco::PooledThread::run() @ 0x276173 in /home/akuzm/ch4/build-clang10/contrib/poco-cmake/Foundation/lib_poco_foundationd.so
2020.07.23 19:43:32.405278 [ 962961 ] {} <Fatal> BaseDaemon: 19. /home/akuzm/ch4/ch/contrib/poco/Foundation/src/Thread.cpp:56: Poco::(anonymous namespace)::RunnableHolder::run() @ 0x27303d in /home/akuzm/ch4/build-clang10/contrib/poco-cmake/Foundation/lib_poco_foundationd.so
2020.07.23 19:43:32.405813 [ 962961 ] {} <Fatal> BaseDaemon: 20. /home/akuzm/ch4/ch/contrib/poco/Foundation/src/Thread_POSIX.cpp:345: Poco::ThreadImpl::runnableEntry(void*) @ 0x271eba in /home/akuzm/ch4/build-clang10/contrib/poco-cmake/Foundation/lib_poco_foundationd.so
2020.07.23 19:43:32.406116 [ 962961 ] {} <Fatal> BaseDaemon: 21. start_thread @ 0x9609 in /lib/x86_64-linux-gnu/libpthread-2.31.so
2020.07.23 19:43:32.406425 [ 962961 ] {} <Fatal> BaseDaemon: 22. /build/glibc-YYA7BZ/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:97: clone @ 0x122103 in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so
```
{
    return getEmbeddedDictionariesImpl(false);
}
const ExternalDictionariesLoader & Context::getExternalDictionariesLoader() const
{
    std::lock_guard lock(shared->external_dictionaries_mutex);
    if (!shared->external_dictionaries_loader)
    {
        if (!this->global_context)
            throw Exception("Logical error: there is no global context", ErrorCodes::LOGICAL_ERROR);
        shared->external_dictionaries_loader.emplace(*this->global_context);
    }
    return *shared->external_dictionaries_loader;
}
ExternalDictionariesLoader & Context::getExternalDictionariesLoader()
{
    return const_cast<ExternalDictionariesLoader &>(const_cast<const Context *>(this)->getExternalDictionariesLoader());
}
const ExternalModelsLoader & Context::getExternalModelsLoader() const
{
    std::lock_guard lock(shared->external_models_mutex);
    if (!shared->external_models_loader)
    {
        if (!this->global_context)
            throw Exception("Logical error: there is no global context", ErrorCodes::LOGICAL_ERROR);
        shared->external_models_loader.emplace(*this->global_context);
    }
    return *shared->external_models_loader;
}
ExternalModelsLoader & Context::getExternalModelsLoader()