mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-22 17:50:47 +00:00
add locks
This commit is contained in:
parent
3b58e9cd67
commit
6da4f5a661
@ -1748,6 +1748,7 @@ void MergeTreeData::calculateColumnSizesImpl()
|
||||
|
||||
void MergeTreeData::addPartContributionToColumnSizes(const DataPartPtr & part)
|
||||
{
|
||||
std::shared_lock<std::shared_mutex> lock(part->columns_lock);
|
||||
const auto & files = part->checksums.files;
|
||||
|
||||
/// TODO This method doesn't take into account columns with multiple files.
|
||||
|
@ -310,6 +310,7 @@ bool ReplicatedMergeTreeQueue::pullLogsToQueue(zkutil::ZooKeeperPtr zookeeper, z
|
||||
const auto & entry = *copied_entries.back();
|
||||
if (entry.type == LogEntry::GET_PART)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mutex);
|
||||
if (entry.create_time && (!min_unprocessed_insert_time || entry.create_time < min_unprocessed_insert_time))
|
||||
{
|
||||
min_unprocessed_insert_time = entry.create_time;
|
||||
|
Loading…
Reference in New Issue
Block a user