Merge pull request #58950 from ClickHouse/fix-data-race-in-slru-2

Fix data race in slru (2)
This commit is contained in:
Alexey Milovidov 2024-01-19 09:31:25 +01:00 committed by GitHub
commit e9acae7774
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -79,7 +79,10 @@ private:
SLRUFileCachePriority * cache_priority;
LRUFileCachePriority::LRUIterator lru_iterator;
const EntryPtr entry;
bool is_protected;
/// Atomic,
/// but needed only in order to do FileSegment::getInfo() without any lock,
/// which is done for system tables and logging.
std::atomic<bool> is_protected;
};
}