let pseudoCRC (for objcache) be per part and not just per SOG
parent
0a4a3199f5
commit
8e6fc69a11
|
@ -147,8 +147,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
private long m_maxPersistTime = 0;
|
private long m_maxPersistTime = 0;
|
||||||
private long m_minPersistTime = 0;
|
private long m_minPersistTime = 0;
|
||||||
|
|
||||||
public int PseudoCRC;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This indicates whether the object has changed such that it needs to be repersisted to permenant storage
|
/// This indicates whether the object has changed such that it needs to be repersisted to permenant storage
|
||||||
/// (the database).
|
/// (the database).
|
||||||
|
@ -167,7 +165,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (Backup)
|
if (Backup)
|
||||||
m_scene.SceneGraph.FireChangeBackup(this);
|
m_scene.SceneGraph.FireChangeBackup(this);
|
||||||
|
|
||||||
PseudoCRC = (int)(DateTime.UtcNow.Ticks);
|
|
||||||
timeLastChanged = DateTime.UtcNow.Ticks;
|
timeLastChanged = DateTime.UtcNow.Ticks;
|
||||||
if (!m_hasGroupChanged)
|
if (!m_hasGroupChanged)
|
||||||
timeFirstChanged = timeLastChanged;
|
timeFirstChanged = timeLastChanged;
|
||||||
|
@ -1336,7 +1333,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public SceneObjectGroup()
|
public SceneObjectGroup()
|
||||||
{
|
{
|
||||||
m_lastCollisionSoundMS = Util.GetTimeStampMS() + 1000.0;
|
m_lastCollisionSoundMS = Util.GetTimeStampMS() + 1000.0;
|
||||||
PseudoCRC = (int)(DateTime.UtcNow.Ticks);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -2545,7 +2541,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
dupe.InvalidatePartsLinkMaps();
|
dupe.InvalidatePartsLinkMaps();
|
||||||
dupe.PseudoCRC = (int)(DateTime.UtcNow.Ticks);
|
|
||||||
m_dupeInProgress = false;
|
m_dupeInProgress = false;
|
||||||
return dupe;
|
return dupe;
|
||||||
}
|
}
|
||||||
|
@ -2799,7 +2795,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PseudoCRC = (int)(DateTime.UtcNow.Ticks);
|
|
||||||
rpart.ScheduleFullUpdate();
|
rpart.ScheduleFullUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2839,7 +2834,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
part.ResetIDs(part.LinkNum); // Don't change link nums
|
part.ResetIDs(part.LinkNum); // Don't change link nums
|
||||||
m_parts.Add(part.UUID, part);
|
m_parts.Add(part.UUID, part);
|
||||||
}
|
}
|
||||||
PseudoCRC = (int)(DateTime.UtcNow.Ticks);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -181,6 +181,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public Vector3 StatusSandboxPos;
|
public Vector3 StatusSandboxPos;
|
||||||
|
|
||||||
|
[XmlIgnore]
|
||||||
|
public int PseudoCRC; // this is local to region. should only be stored on its db.
|
||||||
|
// This is just a number that needs to change to invalidate prim data caches
|
||||||
|
|
||||||
[XmlIgnore]
|
[XmlIgnore]
|
||||||
public int[] PayPrice = {-2,-2,-2,-2,-2};
|
public int[] PayPrice = {-2,-2,-2,-2,-2};
|
||||||
|
|
||||||
|
@ -405,7 +409,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_particleSystem = Utils.EmptyBytes;
|
m_particleSystem = Utils.EmptyBytes;
|
||||||
Rezzed = DateTime.UtcNow;
|
Rezzed = DateTime.UtcNow;
|
||||||
Description = String.Empty;
|
Description = String.Empty;
|
||||||
|
PseudoCRC = (int)DateTime.UtcNow.Ticks; // random could be as good; fallbak if not on region db
|
||||||
|
|
||||||
// Prims currently only contain a single folder (Contents). From looking at the Second Life protocol,
|
// Prims currently only contain a single folder (Contents). From looking at the Second Life protocol,
|
||||||
// this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from
|
// this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from
|
||||||
// the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log
|
// the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log
|
||||||
|
@ -444,6 +449,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
APIDActive = false;
|
APIDActive = false;
|
||||||
Flags = 0;
|
Flags = 0;
|
||||||
CreateSelected = true;
|
CreateSelected = true;
|
||||||
|
PseudoCRC = (int)DateTime.UtcNow.Ticks; // random could be as good
|
||||||
TrimPermissions();
|
TrimPermissions();
|
||||||
AggregateInnerPerms();
|
AggregateInnerPerms();
|
||||||
}
|
}
|
||||||
|
@ -2193,6 +2199,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (dupe.PhysActor != null)
|
if (dupe.PhysActor != null)
|
||||||
dupe.PhysActor.LocalID = plocalID;
|
dupe.PhysActor.LocalID = plocalID;
|
||||||
|
|
||||||
|
dupe.PseudoCRC = (int)(DateTime.UtcNow.Ticks);
|
||||||
|
|
||||||
ParentGroup.Scene.EventManager.TriggerOnSceneObjectPartCopy(dupe, this, userExposed);
|
ParentGroup.Scene.EventManager.TriggerOnSceneObjectPartCopy(dupe, this, userExposed);
|
||||||
|
|
||||||
// m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID);
|
// m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID);
|
||||||
|
@ -3045,6 +3053,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
LinkNum = linkNum;
|
LinkNum = linkNum;
|
||||||
LocalId = 0;
|
LocalId = 0;
|
||||||
Inventory.ResetInventoryIDs();
|
Inventory.ResetInventoryIDs();
|
||||||
|
++PseudoCRC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3195,8 +3204,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
if (ParentGroup == null || ParentGroup.IsDeleted || ParentGroup.Scene == null)
|
if (ParentGroup == null || ParentGroup.IsDeleted || ParentGroup.Scene == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(ParentGroup.Scene.GetNumberOfClients() == 0)
|
++PseudoCRC;
|
||||||
|
if (ParentGroup.Scene.GetNumberOfClients() == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ParentGroup.QueueForUpdateCheck(); // just in case
|
ParentGroup.QueueForUpdateCheck(); // just in case
|
||||||
|
@ -3212,6 +3222,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (ParentGroup == null || ParentGroup.IsDeleted || ParentGroup.Scene == null)
|
if (ParentGroup == null || ParentGroup.IsDeleted || ParentGroup.Scene == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
++PseudoCRC;
|
||||||
|
|
||||||
if (ParentGroup.Scene.GetNumberOfClients() == 0)
|
if (ParentGroup.Scene.GetNumberOfClients() == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -3236,6 +3248,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (ParentGroup == null || ParentGroup.IsDeleted || ParentGroup.Scene == null)
|
if (ParentGroup == null || ParentGroup.IsDeleted || ParentGroup.Scene == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
++PseudoCRC;
|
||||||
ParentGroup.HasGroupChanged = true;
|
ParentGroup.HasGroupChanged = true;
|
||||||
|
|
||||||
if(ParentGroup.Scene.GetNumberOfClients() == 0)
|
if(ParentGroup.Scene.GetNumberOfClients() == 0)
|
||||||
|
@ -3269,6 +3282,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (update == PrimUpdateFlags.None)
|
if (update == PrimUpdateFlags.None)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
++PseudoCRC;
|
||||||
ParentGroup.HasGroupChanged = true;
|
ParentGroup.HasGroupChanged = true;
|
||||||
|
|
||||||
if (ParentGroup.Scene.GetNumberOfClients() == 0)
|
if (ParentGroup.Scene.GetNumberOfClients() == 0)
|
||||||
|
@ -3340,8 +3354,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (ParentGroup == null)
|
if (ParentGroup == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
++PseudoCRC;
|
||||||
// Update the "last" values
|
// Update the "last" values
|
||||||
lock(UpdateFlagLock)
|
lock (UpdateFlagLock)
|
||||||
{
|
{
|
||||||
m_lastPosition = AbsolutePosition;
|
m_lastPosition = AbsolutePosition;
|
||||||
m_lastRotation = RotationOffset;
|
m_lastRotation = RotationOffset;
|
||||||
|
@ -3363,8 +3378,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (ParentGroup == null)
|
if (ParentGroup == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
++PseudoCRC;
|
||||||
// Update the "last" values
|
// Update the "last" values
|
||||||
lock(UpdateFlagLock)
|
lock (UpdateFlagLock)
|
||||||
{
|
{
|
||||||
m_lastPosition = AbsolutePosition;
|
m_lastPosition = AbsolutePosition;
|
||||||
m_lastRotation = RotationOffset;
|
m_lastRotation = RotationOffset;
|
||||||
|
@ -3963,13 +3979,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public void SetGroup(UUID groupID, IClientAPI client)
|
public void SetGroup(UUID groupID, IClientAPI client)
|
||||||
{
|
{
|
||||||
// Scene.AddNewPrims() calls with client == null so can't use this.
|
// Scene.AddNewPrims() calls with client == null so can't use this.
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[SCENE OBJECT PART]: Setting group for {0} to {1} for {2}",
|
// "[SCENE OBJECT PART]: Setting group for {0} to {1} for {2}",
|
||||||
// Name, groupID, OwnerID);
|
// Name, groupID, OwnerID);
|
||||||
|
|
||||||
|
++PseudoCRC;
|
||||||
GroupID = groupID;
|
GroupID = groupID;
|
||||||
// if (client != null)
|
// if (client != null)
|
||||||
// SendPropertiesToClient(client);
|
// SendPropertiesToClient(client);
|
||||||
lock(UpdateFlagLock)
|
lock(UpdateFlagLock)
|
||||||
UpdateFlag |= PrimUpdateFlags.FullUpdate;
|
UpdateFlag |= PrimUpdateFlags.FullUpdate;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue