mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Fix data race between reading/writing is_force_prepare_tables
This commit is contained in:
parent
103eb17107
commit
8fbf93012d
@ -369,7 +369,13 @@ void SystemLog<LogElement>::savingThreadFunction()
|
||||
|
||||
if (to_flush.empty())
|
||||
{
|
||||
if (is_force_prepare_tables)
|
||||
bool force;
|
||||
{
|
||||
std::lock_guard lock(mutex);
|
||||
force = is_force_prepare_tables;
|
||||
}
|
||||
|
||||
if (force)
|
||||
{
|
||||
prepareTable();
|
||||
LOG_TRACE(log, "Table created (force)");
|
||||
|
Loading…
Reference in New Issue
Block a user