mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 13:32:13 +00:00
move Exception in LRUCache::set()
This commit is contained in:
parent
d29a4d0527
commit
abe79fb1c2
@ -83,9 +83,9 @@ public:
|
||||
void set(const Key & key, const MappedPtr & mapped)
|
||||
{
|
||||
std::lock_guard lock(mutex);
|
||||
if (!setImpl(key, mapped, lock))
|
||||
throw Exception(ErrorCodes::CANNOT_RELEASE, "Cannot release the key in LRUCache");
|
||||
setImpl(key, mapped, lock);
|
||||
}
|
||||
|
||||
/**
|
||||
* trySet() will fail (return false) if there is no space left and no keys could be evicted.
|
||||
* Eviction permission of each key is defined by EvictPolicy. In default policy there is no restriction.
|
||||
|
Loading…
Reference in New Issue
Block a user