mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 21:42:39 +00:00
Add a comment
This commit is contained in:
parent
0f8e5b11f7
commit
aa7136c276
@ -355,6 +355,11 @@ public:
|
||||
return;
|
||||
inserted = keys.insert(key).second;
|
||||
}
|
||||
/// There is an invariant that key cannot be submitted for removal if it is already in removal queue.
|
||||
/// Because
|
||||
/// 1) when submit key to removal it aquires state REMOVING and we submit key for removal only if it has ACITVE state.
|
||||
/// 2) if a key is added to cache and it was found in removal queue - it will be removed from the queue and get state ACTIVE.
|
||||
/// and both these actions are synchronized by the same KeyGuard.
|
||||
chassert(inserted);
|
||||
if (inserted)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user