1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-13 23:02:14 +03:00

Undid a bad fix I made where Cache would potentially delete the

wrong file on a flush.
This commit is contained in:
Patrick LeBlanc
2019-05-20 15:51:45 -05:00
parent b8d4891a18
commit 168a1dd194

View File

@@ -426,10 +426,13 @@ void Cache::_makeSpace(size_t size)
assert(currentCacheSize >= (size_t) statbuf.st_size);
currentCacheSize -= statbuf.st_size;
thisMuch -= statbuf.st_size;
//logger->log(LOG_WARNING, "Cache: flushing! Try to avoid this, it may deadlock!");
//logger->log(LOG_WARNING, "Cache: flushing!");
Synchronizer::get()->flushObject(*it);
cachedFile = prefix / *it; // it might have been renamed by the flush
#ifndef NDEBUG
assert(replicator->remove(cachedFile, Replicator::LOCAL_ONLY) == 0);
#else
replicator->remove(cachedFile, Replicator::LOCAL_ONLY);
#endif
LRU_t::iterator toRemove = it++;
m_lru.erase(*toRemove);
lru.erase(toRemove);