dbms: ALTER: writing to log just before waiting for lock [#METR-2944].

This commit is contained in:
Alexey Milovidov 2015-03-27 02:48:50 +03:00
parent bf4bd07065
commit 75dc9db388

View File

@ -1467,6 +1467,8 @@ void StorageReplicatedMergeTree::alterThread()
/// Если описание столбцов изменилось, обновим структуру таблицы локально.
if (changed_version)
{
LOG_INFO(log, "Changed version of 'columns' node in ZooKeeper. Waiting for structure write lock.");
auto table_lock = lockStructureForAlter();
const auto columns_changed = columns != data.getColumnsListNonMaterialized();