Fix a problem in the Flotsam asset cache where assets were being put into the memory cache even when it wasn't enabled.
This hopefully addresses http://opensimulator.org/mantis/view.php?id=5634
This is the most probable cause of the memory problems that people have been seeing in the past month.
This bug has been around since commit 5dc785b
(4th July 2011). Doh! This is why regressions tests are such a good idea... :)
Many thanks to Nebadon for using git bisect to track down this bug, which made it a 5 minute fix.
bulletsim
parent
77625dae36
commit
dcb4b2de09
|
@ -357,8 +357,6 @@ namespace Flotsam.RegionModules.AssetCache
|
|||
|
||||
asset = (AssetBase)bformatter.Deserialize(stream);
|
||||
|
||||
UpdateMemoryCache(id, asset);
|
||||
|
||||
m_DiskHits++;
|
||||
}
|
||||
catch (System.Runtime.Serialization.SerializationException e)
|
||||
|
@ -419,9 +417,15 @@ namespace Flotsam.RegionModules.AssetCache
|
|||
|
||||
if (m_MemoryCacheEnabled)
|
||||
asset = GetFromMemoryCache(id);
|
||||
|
||||
if (asset == null && m_FileCacheEnabled)
|
||||
{
|
||||
asset = GetFromFileCache(id);
|
||||
|
||||
if (m_MemoryCacheEnabled && asset != null)
|
||||
UpdateMemoryCache(id, asset);
|
||||
}
|
||||
|
||||
if (((m_LogLevel >= 1)) && (m_HitRateDisplay != 0) && (m_Requests % m_HitRateDisplay == 0))
|
||||
{
|
||||
m_HitRateFile = (double)m_DiskHits / m_Requests * 100.0;
|
||||
|
|
Loading…
Reference in New Issue