disabled AssetDownloadModule and re-enabled the asset download code in the asset cache, until it can be seen if the module was the cause of some new problems that seem like they might be related to assets. I'll look into this more tomorrow.

0.6.0-stable
MW 2008-02-27 22:47:33 +00:00
parent 2c65c2da90
commit 70ad5604cd
3 changed files with 28 additions and 27 deletions

View File

@ -69,12 +69,12 @@ namespace OpenSim.Framework.Communications.Cache
/// ///
/// Assets requests which are waiting for asset server data. This includes texture requests /// Assets requests which are waiting for asset server data. This includes texture requests
/// </summary> /// </summary>
// private Dictionary<LLUUID, AssetRequest> RequestedAssets; private Dictionary<LLUUID, AssetRequest> RequestedAssets;
/// <summary> /// <summary>
/// Asset requests with data which are ready to be sent back to requesters. This includes textures. /// Asset requests with data which are ready to be sent back to requesters. This includes textures.
/// </summary> /// </summary>
// private List<AssetRequest> AssetRequests; private List<AssetRequest> AssetRequests;
/// <summary> /// <summary>
@ -84,7 +84,7 @@ namespace OpenSim.Framework.Communications.Cache
private readonly IAssetServer m_assetServer; private readonly IAssetServer m_assetServer;
// private readonly Thread m_assetCacheThread; private readonly Thread m_assetCacheThread;
/// <summary> /// <summary>
/// Report statistical data. /// Report statistical data.
@ -94,7 +94,7 @@ namespace OpenSim.Framework.Communications.Cache
m_log.InfoFormat("Assets:{0} Textures:{1} RequestLists:{2}", m_log.InfoFormat("Assets:{0} Textures:{1} RequestLists:{2}",
Assets.Count, Assets.Count,
Textures.Count, Textures.Count,
// AssetRequests.Count, // AssetRequests.Count,
// RequestedAssets.Count, // RequestedAssets.Count,
RequestLists.Count); RequestLists.Count);
@ -150,9 +150,9 @@ namespace OpenSim.Framework.Communications.Cache
{ {
Assets = new Dictionary<LLUUID, AssetInfo>(); Assets = new Dictionary<LLUUID, AssetInfo>();
Textures = new Dictionary<LLUUID, TextureImage>(); Textures = new Dictionary<LLUUID, TextureImage>();
// AssetRequests = new List<AssetRequest>(); AssetRequests = new List<AssetRequest>();
// RequestedAssets = new Dictionary<LLUUID, AssetRequest>(); RequestedAssets = new Dictionary<LLUUID, AssetRequest>();
RequestLists = new Dictionary<LLUUID, AssetRequestsList>(); RequestLists = new Dictionary<LLUUID, AssetRequestsList>();
} }
@ -168,18 +168,18 @@ namespace OpenSim.Framework.Communications.Cache
m_assetServer = assetServer; m_assetServer = assetServer;
m_assetServer.SetReceiver(this); m_assetServer.SetReceiver(this);
// m_assetCacheThread = new Thread(new ThreadStart(RunAssetManager)); m_assetCacheThread = new Thread(new ThreadStart(RunAssetManager));
// m_assetCacheThread.Name = "AssetCacheThread"; m_assetCacheThread.Name = "AssetCacheThread";
// m_assetCacheThread.IsBackground = true; m_assetCacheThread.IsBackground = true;
// m_assetCacheThread.Start(); m_assetCacheThread.Start();
// OpenSim.Framework.ThreadTracker.Add(m_assetCacheThread); OpenSim.Framework.ThreadTracker.Add(m_assetCacheThread);
} }
/// <summary> /// <summary>
/// Process the asset queue which holds data which is packeted up and sent /// Process the asset queue which holds data which is packeted up and sent
/// directly back to the client. /// directly back to the client.
/// </summary> /// </summary>
/* public void RunAssetManager() public void RunAssetManager()
{ {
while (true) while (true)
{ {
@ -193,7 +193,7 @@ namespace OpenSim.Framework.Communications.Cache
m_log.Error("[ASSET CACHE]: " + e.ToString()); m_log.Error("[ASSET CACHE]: " + e.ToString());
} }
} }
}*/ }
/// <summary> /// <summary>
/// Only get an asset if we already have it in the cache. /// Only get an asset if we already have it in the cache.
@ -449,7 +449,7 @@ namespace OpenSim.Framework.Communications.Cache
StatsManager.SimExtraStats.AddAsset(assetInf); StatsManager.SimExtraStats.AddAsset(assetInf);
} }
/* if (RequestedAssets.ContainsKey(assetInf.FullID)) if (RequestedAssets.ContainsKey(assetInf.FullID))
{ {
#if DEBUG #if DEBUG
//m_log.DebugFormat("[ASSET CACHE]: Moving {0} from RequestedAssets to AssetRequests", asset.FullID); //m_log.DebugFormat("[ASSET CACHE]: Moving {0} from RequestedAssets to AssetRequests", asset.FullID);
@ -461,7 +461,7 @@ namespace OpenSim.Framework.Communications.Cache
RequestedAssets.Remove(assetInf.FullID); RequestedAssets.Remove(assetInf.FullID);
AssetRequests.Add(req); AssetRequests.Add(req);
}*/ }
} }
} }
@ -485,6 +485,7 @@ namespace OpenSim.Framework.Communications.Cache
//texturedownloadmodule , and hitting a lock in there. While the texturedownload thread (which was holding //texturedownloadmodule , and hitting a lock in there. While the texturedownload thread (which was holding
// the lock in the texturedownload module) was trying to // the lock in the texturedownload module) was trying to
//request a new asset and hitting a lock in here on the RequestLists. //request a new asset and hitting a lock in here on the RequestLists.
List<NewAssetRequest> theseRequests = new List<NewAssetRequest>(reqList.Requests); List<NewAssetRequest> theseRequests = new List<NewAssetRequest>(reqList.Requests);
reqList.Requests.Clear(); reqList.Requests.Clear();
@ -541,7 +542,7 @@ namespace OpenSim.Framework.Communications.Cache
} }
/*
/// <summary> /// <summary>
/// Calculate the number of packets required to send the asset to the client. /// Calculate the number of packets required to send the asset to the client.
/// </summary> /// </summary>
@ -735,7 +736,7 @@ namespace OpenSim.Framework.Communications.Cache
{ {
} }
} }
*/
public class AssetInfo : AssetBase public class AssetInfo : AssetBase
{ {

View File

@ -3564,12 +3564,12 @@ namespace OpenSim.Region.ClientStack
case PacketType.TransferRequest: case PacketType.TransferRequest:
//Console.WriteLine("ClientView.ProcessPackets.cs:ProcessInPacket() - Got transfer request"); //Console.WriteLine("ClientView.ProcessPackets.cs:ProcessInPacket() - Got transfer request");
TransferRequestPacket transfer = (TransferRequestPacket)Pack; TransferRequestPacket transfer = (TransferRequestPacket)Pack;
// m_assetCache.AddAssetRequest(this, transfer); m_assetCache.AddAssetRequest(this, transfer);
handler094 = OnRequestAsset; /* handler094 = OnRequestAsset;
if (handler094 != null) if (handler094 != null)
{ {
handler094(this, transfer); handler094(this, transfer);
} }*/
break; break;
case PacketType.AssetUploadRequest: case PacketType.AssetUploadRequest:
AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack;

View File

@ -65,17 +65,17 @@ namespace OpenSim.Region.Environment.Modules
if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID)) if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
{ {
RegisteredScenes.Add(scene.RegionInfo.RegionID, scene); RegisteredScenes.Add(scene.RegionInfo.RegionID, scene);
scene.EventManager.OnNewClient += NewClient; // scene.EventManager.OnNewClient += NewClient;
} }
if (m_scene == null) if (m_scene == null)
{ {
m_scene = scene; m_scene = scene;
m_thread = new Thread(new ThreadStart(RunAssetQueue)); // m_thread = new Thread(new ThreadStart(RunAssetQueue));
m_thread.Name = "AssetDownloadQueueThread"; // m_thread.Name = "AssetDownloadQueueThread";
m_thread.IsBackground = true; // m_thread.IsBackground = true;
m_thread.Start(); // m_thread.Start();
OpenSim.Framework.ThreadTracker.Add(m_thread); // OpenSim.Framework.ThreadTracker.Add(m_thread);
} }
} }
@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules
public void NewClient(IClientAPI client) public void NewClient(IClientAPI client)
{ {
client.OnRequestAsset += AddAssetRequest; // client.OnRequestAsset += AddAssetRequest;
} }
/// <summary> /// <summary>