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

Fixed a bug where Cache could delete the wrong file after a flush.

This commit is contained in:
Patrick LeBlanc
2019-05-17 12:11:57 -05:00
parent 77b682f9cd
commit 8b29e3f9ce

View File

@@ -428,7 +428,8 @@ void Cache::_makeSpace(size_t size)
thisMuch -= statbuf.st_size;
//logger->log(LOG_WARNING, "Cache: flushing! Try to avoid this, it may deadlock!");
Synchronizer::get()->flushObject(*it);
replicator->remove(cachedFile.string().c_str(), Replicator::LOCAL_ONLY);
cachedFile = prefix / *it; // it might have been renamed by the flush
replicator->remove(cachedFile, Replicator::LOCAL_ONLY);
LRU_t::iterator toRemove = it++;
m_lru.erase(*toRemove);
lru.erase(toRemove);