* Remove dumb bug I put in which meant that an archive save would never complete if there were any missing assets

0.6.0-stable
Justin Clarke Casey 2008-07-25 15:18:24 +00:00
parent f2bc404e70
commit fd4e703f25
5 changed files with 17 additions and 10 deletions

View File

@ -261,7 +261,7 @@ namespace OpenSim.Data.SQLite
shapeRow.Delete(); shapeRow.Delete();
} }
RemoveItems(uuid); RemoveItems(uuid);
// Remove prim row // Remove prim row
row.Delete(); row.Delete();

View File

@ -169,9 +169,6 @@ namespace OpenSim.Framework
} }
} }
static PrimitiveBaseShape() static PrimitiveBaseShape()
{ {
m_defaultTexture = m_defaultTexture =
@ -188,7 +185,11 @@ namespace OpenSim.Framework
[XmlIgnore] [XmlIgnore]
public LLObject.TextureEntry Textures public LLObject.TextureEntry Textures
{ {
get { return new LLObject.TextureEntry(m_textureEntry, 0, m_textureEntry.Length); } get
{
//m_log.DebugFormat("[PRIMITIVE BASE SHAPE]: get m_textureEntry length {0}", m_textureEntry.Length);
return new LLObject.TextureEntry(m_textureEntry, 0, m_textureEntry.Length);
}
set { m_textureEntry = value.ToBytes(); } set { m_textureEntry = value.ToBytes(); }
} }
@ -206,8 +207,6 @@ namespace OpenSim.Framework
} }
} }
public static PrimitiveBaseShape Default public static PrimitiveBaseShape Default
{ {
get get

View File

@ -199,7 +199,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
protected void GetSceneObjectAssetUuids(SceneObjectGroup sceneObject, IDictionary<LLUUID, int> assetUuids) protected void GetSceneObjectAssetUuids(SceneObjectGroup sceneObject, IDictionary<LLUUID, int> assetUuids)
{ {
m_log.DebugFormat( m_log.DebugFormat(
"[ARCHIVER]: Getting assets for object {0}, {1}", sceneObject.RootPart.Name, sceneObject.UUID); "[ARCHIVER]: Getting assets for object {0}, {1}", sceneObject.Name, sceneObject.UUID);
foreach (SceneObjectPart part in sceneObject.GetParts()) foreach (SceneObjectPart part in sceneObject.GetParts())
{ {
@ -255,6 +255,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
catch (Exception e) catch (Exception e)
{ {
m_log.ErrorFormat("[ARCHIVER]: Failed to get part - {0}", e); m_log.ErrorFormat("[ARCHIVER]: Failed to get part - {0}", e);
m_log.DebugFormat("[ARCHIVER]: Texture entry length for prim was {0} (min is 46)", part.Shape.TextureEntry.Length);
} }
} }
} }

View File

@ -30,8 +30,10 @@ using OpenSim.Framework.Communications.Cache;
using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Scenes;
using System.Collections.Generic; using System.Collections.Generic;
//using System.Reflection;
using System.Threading; using System.Threading;
using libsecondlife; using libsecondlife;
//using log4net;
namespace OpenSim.Region.Environment.Modules.World.Archiver namespace OpenSim.Region.Environment.Modules.World.Archiver
{ {
@ -40,6 +42,8 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
/// </summary> /// </summary>
class AssetsRequest class AssetsRequest
{ {
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
/// <summary> /// <summary>
/// uuids to request /// uuids to request
/// </summary> /// </summary>
@ -101,8 +105,11 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
m_assets[assetID] = asset; m_assets[assetID] = asset;
else else
m_notFoundAssetUuids.Add(assetID); m_notFoundAssetUuids.Add(assetID);
//m_log.DebugFormat(
// "[ARCHIVER]: Received {0} assets and notification of {1} missing assets", m_assets.Count, m_notFoundAssetUuids.Count);
if (m_assets.Count == m_repliesRequired) if (m_assets.Count + m_notFoundAssetUuids.Count == m_repliesRequired)
{ {
// We want to stop using the asset cache thread asap as we now need to do the actual work of producing the archive // We want to stop using the asset cache thread asap as we now need to do the actual work of producing the archive
Thread newThread = new Thread(PerformAssetsRequestCallback); Thread newThread = new Thread(PerformAssetsRequestCallback);

View File

@ -828,7 +828,7 @@ namespace OpenSim.Region.Environment.Scenes
} }
catch (Exception e) catch (Exception e)
{ {
m_log.Error("Failed to add scened object part", e); m_log.Error("Failed to add scene object part", e);
} }
part.LinkNum = m_parts.Count; part.LinkNum = m_parts.Count;