dbms: tiny modification [#METR-13153].

This commit is contained in:
Alexey Milovidov 2014-10-16 00:28:43 +04:00
parent 07ba420b85
commit afc4f7fcf0

View File

@ -2371,13 +2371,15 @@ void StorageReplicatedMergeTree::attachPartition(const Field & field, bool unrep
LOG_DEBUG(log, "Adding attaches to log");
zookeeper->multi(ops);
size_t i = 0;
for (LogEntry & entry : entries)
{
String log_znode_path = dynamic_cast<zkutil::Op::Create &>(ops[i++]).getPathCreated();
String log_znode_path = dynamic_cast<zkutil::Op::Create &>(ops[i]).getPathCreated();
entry.znode_name = log_znode_path.substr(log_znode_path.find_last_of('/') + 1);
waitForAllReplicasToProcessLogEntry(entry);
++i;
}
}