Fix harder

This commit is contained in:
Konstantin Bogdanov 2024-07-24 04:33:47 +02:00
parent f239dd67ee
commit aa9908f6da
Signed by: thevar1able
GPG Key ID: DB399448D9FE52F1
2 changed files with 2 additions and 1 deletions

View File

@ -642,7 +642,7 @@ LoadTaskPtr DatabaseReplicated::startupDatabaseAsync(AsyncLoader & async_loader,
return; return;
{ {
std::lock_guard lock{mutex}; std::lock_guard lock{ddl_worker_mutex};
ddl_worker = std::make_unique<DatabaseReplicatedDDLWorker>(this, getContext()); ddl_worker = std::make_unique<DatabaseReplicatedDDLWorker>(this, getContext());
} }
ddl_worker->startup(); ddl_worker->startup();

View File

@ -149,6 +149,7 @@ private:
std::atomic_bool is_recovering = false; std::atomic_bool is_recovering = false;
std::atomic_bool ddl_worker_initialized = false; std::atomic_bool ddl_worker_initialized = false;
std::unique_ptr<DatabaseReplicatedDDLWorker> ddl_worker; std::unique_ptr<DatabaseReplicatedDDLWorker> ddl_worker;
std::mutex ddl_worker_mutex;
UInt32 max_log_ptr_at_creation = 0; UInt32 max_log_ptr_at_creation = 0;
/// Usually operation with metadata are single-threaded because of the way replication works, /// Usually operation with metadata are single-threaded because of the way replication works,