diff --git a/primitives/blockcache/filebuffermgr.cpp b/primitives/blockcache/filebuffermgr.cpp index 8ddc3d3f3..fbdc2cb68 100644 --- a/primitives/blockcache/filebuffermgr.cpp +++ b/primitives/blockcache/filebuffermgr.cpp @@ -293,9 +293,12 @@ void FileBufferMgr::flushOIDs(const uint32_t* oids, uint32_t count) { fbList.erase(fFBPool[tmpIt->second->poolIdx].listLoc()); fEmptyPoolSlots.push_back(tmpIt->second->poolIdx); - fbSet.erase(tmpIt->second); fCacheSize--; } + for (byLBID_t::iterator tmpIt = itList.first; tmpIt != itList.second; tmpIt++) + { + fbSet.erase(tmpIt->second); + } } } }