aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-13 15:16:43 +0100
committerJustin Clark-Casey (justincc)2011-08-13 15:21:03 +0100
commitdcb4b2de09032380fb428f73d9e3fd10aa662377 (patch)
treec6fccdd2a6c55fecee340dd2d2b7d6bb3687fe8a
parentRevert "llGetPrimitveParams fix prim hollow/hole shape return value" (diff)
downloadopensim-SC_OLD-dcb4b2de09032380fb428f73d9e3fd10aa662377.zip
opensim-SC_OLD-dcb4b2de09032380fb428f73d9e3fd10aa662377.tar.gz
opensim-SC_OLD-dcb4b2de09032380fb428f73d9e3fd10aa662377.tar.bz2
opensim-SC_OLD-dcb4b2de09032380fb428f73d9e3fd10aa662377.tar.xz
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.
-rw-r--r--OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index 7ef759c..abfc771 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -357,8 +357,6 @@ namespace Flotsam.RegionModules.AssetCache
357 357
358 asset = (AssetBase)bformatter.Deserialize(stream); 358 asset = (AssetBase)bformatter.Deserialize(stream);
359 359
360 UpdateMemoryCache(id, asset);
361
362 m_DiskHits++; 360 m_DiskHits++;
363 } 361 }
364 catch (System.Runtime.Serialization.SerializationException e) 362 catch (System.Runtime.Serialization.SerializationException e)
@@ -419,9 +417,15 @@ namespace Flotsam.RegionModules.AssetCache
419 417
420 if (m_MemoryCacheEnabled) 418 if (m_MemoryCacheEnabled)
421 asset = GetFromMemoryCache(id); 419 asset = GetFromMemoryCache(id);
420
422 if (asset == null && m_FileCacheEnabled) 421 if (asset == null && m_FileCacheEnabled)
422 {
423 asset = GetFromFileCache(id); 423 asset = GetFromFileCache(id);
424 424
425 if (m_MemoryCacheEnabled && asset != null)
426 UpdateMemoryCache(id, asset);
427 }
428
425 if (((m_LogLevel >= 1)) && (m_HitRateDisplay != 0) && (m_Requests % m_HitRateDisplay == 0)) 429 if (((m_LogLevel >= 1)) && (m_HitRateDisplay != 0) && (m_Requests % m_HitRateDisplay == 0))
426 { 430 {
427 m_HitRateFile = (double)m_DiskHits / m_Requests * 100.0; 431 m_HitRateFile = (double)m_DiskHits / m_Requests * 100.0;