Fixed awful copypaste. [#CLICKHOUSE-3178]

This commit is contained in:
Vitaliy Lyudvichenko 2017-10-04 17:36:27 +03:00
parent b5c7eaa80e
commit d6ea9c3dcf

View File

@ -1978,8 +1978,7 @@ MergeTreeData::DataPartsVector MergeTreeData::getDataPartsVector(const DataPartS
DataPartsVector res;
{
std::lock_guard<std::mutex> lock(data_parts_mutex);
std::copy_if(data_parts.begin(), data_parts.end(), std::back_inserter(res),
DataPart::getStatesFilter({DataPartState::Committed}));
std::copy_if(data_parts.begin(), data_parts.end(), std::back_inserter(res), DataPart::getStatesFilter(affordable_states));
}
return res;
}
@ -1989,8 +1988,7 @@ MergeTreeData::DataParts MergeTreeData::getDataParts(const DataPartStates & affo
DataParts res;
{
std::lock_guard<std::mutex> lock(data_parts_mutex);
std::copy_if(data_parts.begin(), data_parts.end(), std::inserter(res, res.end()),
DataPart::getStatesFilter({DataPartState::Committed}));
std::copy_if(data_parts.begin(), data_parts.end(), std::inserter(res, res.end()), DataPart::getStatesFilter(affordable_states));
}
return res;
}