let pseudoCRC (for objcache) be per part and not just per SOG

master
UbitUmarov 2020-03-27 17:22:18 +00:00
parent 0a4a3199f5
commit 8e6fc69a11
2 changed files with 28 additions and 17 deletions

View File

@ -147,8 +147,6 @@ namespace OpenSim.Region.Framework.Scenes
private long m_maxPersistTime = 0;
private long m_minPersistTime = 0;
public int PseudoCRC;
/// <summary>
/// This indicates whether the object has changed such that it needs to be repersisted to permenant storage
/// (the database).
@ -167,7 +165,6 @@ namespace OpenSim.Region.Framework.Scenes
if (Backup)
m_scene.SceneGraph.FireChangeBackup(this);
PseudoCRC = (int)(DateTime.UtcNow.Ticks);
timeLastChanged = DateTime.UtcNow.Ticks;
if (!m_hasGroupChanged)
timeFirstChanged = timeLastChanged;
@ -1336,7 +1333,6 @@ namespace OpenSim.Region.Framework.Scenes
public SceneObjectGroup()
{
m_lastCollisionSoundMS = Util.GetTimeStampMS() + 1000.0;
PseudoCRC = (int)(DateTime.UtcNow.Ticks);
}
/// <summary>
@ -2545,7 +2541,7 @@ namespace OpenSim.Region.Framework.Scenes
}
dupe.InvalidatePartsLinkMaps();
dupe.PseudoCRC = (int)(DateTime.UtcNow.Ticks);
m_dupeInProgress = false;
return dupe;
}
@ -2799,7 +2795,6 @@ namespace OpenSim.Region.Framework.Scenes
}
}
PseudoCRC = (int)(DateTime.UtcNow.Ticks);
rpart.ScheduleFullUpdate();
}
@ -2839,7 +2834,6 @@ namespace OpenSim.Region.Framework.Scenes
part.ResetIDs(part.LinkNum); // Don't change link nums
m_parts.Add(part.UUID, part);
}
PseudoCRC = (int)(DateTime.UtcNow.Ticks);
}
}

View File

@ -181,6 +181,10 @@ namespace OpenSim.Region.Framework.Scenes
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]
public int[] PayPrice = {-2,-2,-2,-2,-2};
@ -405,6 +409,7 @@ namespace OpenSim.Region.Framework.Scenes
m_particleSystem = Utils.EmptyBytes;
Rezzed = DateTime.UtcNow;
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,
// this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from
@ -444,6 +449,7 @@ namespace OpenSim.Region.Framework.Scenes
APIDActive = false;
Flags = 0;
CreateSelected = true;
PseudoCRC = (int)DateTime.UtcNow.Ticks; // random could be as good
TrimPermissions();
AggregateInnerPerms();
}
@ -2193,6 +2199,8 @@ namespace OpenSim.Region.Framework.Scenes
if (dupe.PhysActor != null)
dupe.PhysActor.LocalID = plocalID;
dupe.PseudoCRC = (int)(DateTime.UtcNow.Ticks);
ParentGroup.Scene.EventManager.TriggerOnSceneObjectPartCopy(dupe, this, userExposed);
// m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID);
@ -3045,6 +3053,7 @@ namespace OpenSim.Region.Framework.Scenes
LinkNum = linkNum;
LocalId = 0;
Inventory.ResetInventoryIDs();
++PseudoCRC;
}
@ -3196,6 +3205,7 @@ namespace OpenSim.Region.Framework.Scenes
if (ParentGroup == null || ParentGroup.IsDeleted || ParentGroup.Scene == null)
return;
++PseudoCRC;
if (ParentGroup.Scene.GetNumberOfClients() == 0)
return;
@ -3212,6 +3222,8 @@ namespace OpenSim.Region.Framework.Scenes
if (ParentGroup == null || ParentGroup.IsDeleted || ParentGroup.Scene == null)
return;
++PseudoCRC;
if (ParentGroup.Scene.GetNumberOfClients() == 0)
return;
@ -3236,6 +3248,7 @@ namespace OpenSim.Region.Framework.Scenes
if (ParentGroup == null || ParentGroup.IsDeleted || ParentGroup.Scene == null)
return;
++PseudoCRC;
ParentGroup.HasGroupChanged = true;
if(ParentGroup.Scene.GetNumberOfClients() == 0)
@ -3269,6 +3282,7 @@ namespace OpenSim.Region.Framework.Scenes
if (update == PrimUpdateFlags.None)
return;
++PseudoCRC;
ParentGroup.HasGroupChanged = true;
if (ParentGroup.Scene.GetNumberOfClients() == 0)
@ -3340,6 +3354,7 @@ namespace OpenSim.Region.Framework.Scenes
if (ParentGroup == null)
return;
++PseudoCRC;
// Update the "last" values
lock (UpdateFlagLock)
{
@ -3363,6 +3378,7 @@ namespace OpenSim.Region.Framework.Scenes
if (ParentGroup == null)
return;
++PseudoCRC;
// Update the "last" values
lock (UpdateFlagLock)
{
@ -3967,6 +3983,7 @@ namespace OpenSim.Region.Framework.Scenes
// "[SCENE OBJECT PART]: Setting group for {0} to {1} for {2}",
// Name, groupID, OwnerID);
++PseudoCRC;
GroupID = groupID;
// if (client != null)
// SendPropertiesToClient(client);