mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 18:12:02 +00:00
CacheDictionary request only unique keys from source
This commit is contained in:
parent
89fab1ef93
commit
23bd23802f
@ -552,13 +552,14 @@ void CacheDictionary<dictionary_key_type>::update(CacheDictionaryUpdateUnitPtr<d
|
|||||||
if (key_index_to_state_from_storage[i].isExpired()
|
if (key_index_to_state_from_storage[i].isExpired()
|
||||||
|| key_index_to_state_from_storage[i].isNotFound())
|
|| key_index_to_state_from_storage[i].isNotFound())
|
||||||
{
|
{
|
||||||
|
auto requested_key = requested_keys[i];
|
||||||
|
auto [_, inserted] = not_found_keys.insert(requested_key);
|
||||||
|
if (inserted) {
|
||||||
if constexpr (dictionary_key_type == DictionaryKeyType::Simple)
|
if constexpr (dictionary_key_type == DictionaryKeyType::Simple)
|
||||||
requested_keys_vector.emplace_back(requested_keys[i]);
|
requested_keys_vector.emplace_back(requested_keys[i]);
|
||||||
else
|
else
|
||||||
requested_complex_key_rows.emplace_back(i);
|
requested_complex_key_rows.emplace_back(i);
|
||||||
|
}
|
||||||
auto requested_key = requested_keys[i];
|
|
||||||
not_found_keys.insert(requested_key);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user