mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Fixed style.
This commit is contained in:
parent
4f799467ec
commit
cd51535a67
@ -70,9 +70,9 @@ public:
|
||||
|
||||
void removeWithPredicate(std::function<bool(const Key&, const MappedPtr&)> predicate) override
|
||||
{
|
||||
for(auto it = cells.begin(); it != cells.end();)
|
||||
for (auto it = cells.begin(); it != cells.end();)
|
||||
{
|
||||
if(predicate(it->first, it->second.value))
|
||||
if (predicate(it->first, it->second.value))
|
||||
{
|
||||
auto & cell = it->second;
|
||||
current_size_in_bytes -= cell.size;
|
||||
|
@ -97,9 +97,9 @@ public:
|
||||
|
||||
void removeWithPredicate(std::function<bool(const Key&, const MappedPtr&)> predicate) override
|
||||
{
|
||||
for(auto it = cells.begin(); it != cells.end();)
|
||||
for (auto it = cells.begin(); it != cells.end();)
|
||||
{
|
||||
if(predicate(it->first, it->second.value))
|
||||
if (predicate(it->first, it->second.value))
|
||||
{
|
||||
auto & cell = it->second;
|
||||
|
||||
|
@ -135,9 +135,9 @@ public:
|
||||
|
||||
void removeWithPredicate(std::function<bool(const Key&, const MappedPtr&)> predicate) override
|
||||
{
|
||||
for(auto it = cache.begin(); it != cache.end();)
|
||||
for (auto it = cache.begin(); it != cache.end();)
|
||||
{
|
||||
if(predicate(it->first, it->second))
|
||||
if (predicate(it->first, it->second))
|
||||
{
|
||||
size_t sz = weight_function(*it->second);
|
||||
if (it->first.user_id.has_value())
|
||||
|
@ -621,10 +621,11 @@ QueryCache::Writer QueryCache::createWriter(const Key & key, std::chrono::millis
|
||||
|
||||
void QueryCache::clearWithTag(const String & tag)
|
||||
{
|
||||
auto removeWithTag = [tag](const Key & k, const Cache::MappedPtr & _){
|
||||
auto remove_with_tag = [tag](const Key & k, const Cache::MappedPtr & _)
|
||||
{
|
||||
return k.tag == tag;
|
||||
};
|
||||
cache.removeWithPredicate(removeWithTag);
|
||||
cache.removeWithPredicate(remove_with_tag);
|
||||
std::lock_guard lock(mutex);
|
||||
}
|
||||
|
||||
|
@ -370,7 +370,7 @@ BlockIO InterpreterSystemQuery::execute()
|
||||
break;
|
||||
case Type::DROP_QUERY_CACHE:
|
||||
{
|
||||
getContext()->checkAccess(AccessType::SYSTEM_DROP_QUERY_CACHE);
|
||||
getContext()->checkAccess(AccessType::SYSTEM_DROP_QUERY_CACHE);
|
||||
!query.query_cache_tag.empty() ? getContext()->clearQueryCacheWithTag(query.query_cache_tag): getContext()->clearQueryCache();
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user