Less locks

This commit is contained in:
Konstantin Bogdanov 2024-07-24 07:55:36 +02:00
parent 80b9b13771
commit e21d23d04d
Signed by: thevar1able
GPG Key ID: DB399448D9FE52F1

View File

@ -689,11 +689,8 @@ bool DatabaseReplicated::checkDigestValid(const ContextPtr & local_context, bool
LOG_TEST(log, "Current in-memory metadata digest: {}", tables_metadata_digest);
/// Database is probably being dropped
{
std::lock_guard lock{ddl_worker_mutex};
if (!local_context->getZooKeeperMetadataTransaction() && (!ddl_worker || !ddl_worker->isCurrentlyActive()))
return true;
}
if (!local_context->getZooKeeperMetadataTransaction() && (!ddl_worker || !ddl_worker->isCurrentlyActive()))
return true;
UInt64 local_digest = 0;
{