fix races in 01108_restart_replicas_rename_deadlock

This commit is contained in:
Alexander Tokmakov 2020-04-03 03:08:29 +03:00
parent 4075f26583
commit cb933a3d19
3 changed files with 2 additions and 3 deletions

View File

@ -38,7 +38,7 @@
/* Implementation: */
static int _libcpiud_errno = ERR_OK;
_Thread_local int _libcpiud_errno = ERR_OK;
int set_error(cpu_error_t err)
{

View File

@ -4,7 +4,6 @@
#include <Common/config.h>
#if USE_CPUID
# include <libcpuid/libcpuid.h>
# include <Common/Exception.h>
#elif USE_CPUINFO
# include <cpuinfo.h>
#endif

View File

@ -366,7 +366,7 @@ void InterpreterSystemQuery::restartReplicas(Context & system_context)
for (auto iterator = database->getTablesIterator(system_context); iterator->isValid(); iterator->next())
{
if (dynamic_cast<const StorageReplicatedMergeTree *>(iterator->table().get()))
replica_names.emplace_back(iterator->table()->getStorageID());
replica_names.emplace_back(StorageID{database->getDatabaseName(), iterator->name()});
}
}