aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-03-09 17:55:08 +0000
committerJustin Clarke Casey2009-03-09 17:55:08 +0000
commit5a6bc26600c80d8e838bafdde4df970841c6c285 (patch)
treee85ab9419eb14c03601b02abfb455ee46e5d671e /OpenSim/Region/CoreModules/World
parent* Added TXXX in front of unit tests to make sure they are running in the corr... (diff)
downloadopensim-SC_OLD-5a6bc26600c80d8e838bafdde4df970841c6c285.zip
opensim-SC_OLD-5a6bc26600c80d8e838bafdde4df970841c6c285.tar.gz
opensim-SC_OLD-5a6bc26600c80d8e838bafdde4df970841c6c285.tar.bz2
opensim-SC_OLD-5a6bc26600c80d8e838bafdde4df970841c6c285.tar.xz
* Address http://opensimulator.org/mantis/view.php?id=3207
* A saved archive now immediately expires the data in the asset cache that it used, rather than retaining all the assets (esp textures) in the cache. * This is an imperfect solution. Ideally we would only expire the assets newly requested for the archive (not existing ones). But doing that would require a lot more restructuring. * I don't believe there are any locking issues due to the locking performed by the underlying memory cache, but please report any issues.
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
index 99ec9b4..076fbce 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
@@ -72,7 +72,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
72 /// </summary> 72 /// </summary>
73 protected IAssetCache m_assetCache; 73 protected IAssetCache m_assetCache;
74 74
75 protected internal AssetsRequest(ICollection<UUID> uuids, IAssetCache assetCache, AssetsRequestCallback assetsRequestCallback) 75 protected internal AssetsRequest(
76 ICollection<UUID> uuids, IAssetCache assetCache, AssetsRequestCallback assetsRequestCallback)
76 { 77 {
77 m_uuids = uuids; 78 m_uuids = uuids;
78 m_assetsRequestCallback = assetsRequestCallback; 79 m_assetsRequestCallback = assetsRequestCallback;
@@ -100,9 +101,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver
100 public void AssetRequestCallback(UUID assetID, AssetBase asset) 101 public void AssetRequestCallback(UUID assetID, AssetBase asset)
101 { 102 {
102 if (asset != null) 103 if (asset != null)
103 m_assets[assetID] = asset; 104 {
105 m_assetCache.ExpireAsset(assetID);
106 m_assets[assetID] = asset;
107 }
104 else 108 else
109 {
105 m_notFoundAssetUuids.Add(assetID); 110 m_notFoundAssetUuids.Add(assetID);
111 }
106 112
107 //m_log.DebugFormat( 113 //m_log.DebugFormat(
108 // "[ARCHIVER]: Received {0} assets and notification of {1} missing assets", m_assets.Count, m_notFoundAssetUuids.Count); 114 // "[ARCHIVER]: Received {0} assets and notification of {1} missing assets", m_assets.Count, m_notFoundAssetUuids.Count);