1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-12 11:01:17 +03:00

Added a couple assertions in Cache to keep us honest during testing.

Added a 'real' test for IOC::copyFile().  Looks good, will merge it.
This commit is contained in:
Patrick LeBlanc
2019-04-04 11:06:17 -05:00
parent 67ad5f445e
commit fe2c5b64d0
2 changed files with 77 additions and 1 deletions

View File

@@ -303,12 +303,14 @@ void Cache::newJournalEntry(size_t size)
void Cache::deletedJournal(size_t size)
{
boost::unique_lock<boost::mutex> s(lru_mutex);
assert(currentCacheSize >= size);
currentCacheSize -= size;
}
void Cache::deletedObject(const string &key, size_t size)
{
boost::unique_lock<boost::mutex> s(lru_mutex);
assert(currentCacheSize >= size);
M_LRU_t::iterator mit = m_lru.find(key);
assert(mit != m_lru.end());
assert(doNotEvict.find(mit->lit) == doNotEvict.end());