Merge pull request #37655 from ClickHouse/kssenii-patch-3-1

Fix hung check
This commit is contained in:
Kseniia Sumarokova 2022-05-30 21:22:12 +02:00 committed by GitHub
commit 18bda56e4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 7 deletions

View File

@ -638,10 +638,6 @@ void LRUFileCache::remove(const Key & key)
if (fs::exists(key_path))
fs::remove(key_path);
#ifndef NDEBUG
assertCacheCorrectness(cache_lock);
#endif
}
void LRUFileCache::remove()
@ -1053,8 +1049,7 @@ void LRUFileCache::assertCacheCellsCorrectness(
if (file_segment->reserved_size != 0)
{
assert(cell.queue_iterator);
/// FIXME: this is too slow, need to make it O(1)
/// assert(queue.contains(file_segment->key(), file_segment->offset(), cache_lock));
assert(queue.contains(file_segment->key(), file_segment->offset(), cache_lock));
}
}
}

View File

@ -301,7 +301,7 @@ private:
size_t getFileSegmentsNumUnlocked(std::lock_guard<std::mutex> & cache_lock) const;
static void assertCacheCellsCorrectness(const FileSegmentsByOffset & cells_by_offset, std::lock_guard<std::mutex> & cache_lock);
void assertCacheCellsCorrectness(const FileSegmentsByOffset & cells_by_offset, std::lock_guard<std::mutex> & cache_lock);
public:
String dumpStructure(const Key & key_) override;