From 411fa60b2b17f59103f40159557ac5246a627943 Mon Sep 17 00:00:00 2001 From: "Huaiyu (Kitty) Liu" Date: Mon, 14 Feb 2011 11:33:57 -0800 Subject: [PATCH] RegionSyncModule.SendLinkObject and SendLinkObject now call BucketSyncInfoUpdate() for the linked/delinked objects, to make sure they have updated timestamp information for synchronization purpose. --- .../SymmetricSync/RegionSyncModule.cs | 9 +++++++++ OpenSim/Region/Framework/Scenes/SceneGraph.cs | 1 - .../Region/Framework/Scenes/SceneObjectGroup.cs | 8 +++++--- .../Region/Framework/Scenes/SceneObjectPart.cs | 15 ++++++++++++++- .../Shared/Api/Implementation/LSL_Api.cs | 2 +- 5 files changed, 29 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs index 4012666bf7..e683e2d1bb 100644 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs @@ -515,6 +515,9 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule return; } + //First, make sure the linked group has updated timestamp info for synchronization + linkedGroup.BucketSyncInfoUpdate(); + OSDMap data = new OSDMap(); string sogxml = SceneObjectSerializer.ToXml2Format(linkedGroup); data["linkedGroup"]=OSD.FromString(sogxml); @@ -573,6 +576,12 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule groupNum++; } + //make sure the newly delinked objects have the updated timestamp information + foreach (SceneObjectGroup sog in afterDelinkGroups) + { + sog.BucketSyncInfoUpdate(); + } + SymmetricSyncMessage rsm = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.DelinkObject, OSDParser.SerializeJsonString(data)); SendDelinkObjectToRelevantSyncConnectors(beforeDelinkGroups, rsm); } diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 191ca1aa55..96a7075942 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1601,7 +1601,6 @@ namespace OpenSim.Region.Framework.Scenes if (m_parentScene.RegionSyncModule != null) { //Tell other actors to link the SceneObjectParts together as a new group. - //parentGroup.SyncInfoUpdate(); m_parentScene.RegionSyncModule.SendLinkObject(parentGroup, root, children); } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index d81f4b08c0..d4a7d1099e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -4046,17 +4046,19 @@ namespace OpenSim.Region.Framework.Scenes } - /* - public void SyncInfoUpdate() + + public void BucketSyncInfoUpdate() { long timeStamp = DateTime.Now.Ticks; string actorID = m_scene.GetSyncActorID(); foreach (SceneObjectPart part in Parts) { - part.SyncInfoUpdate(timeStamp, actorID); + //part.SyncInfoUpdate(timeStamp, actorID); + part.UpdateAllBucketSyncInfo(timeStamp); } } + /* public void SyncInfoUpdate(long timeStamp, string actorID) { foreach (SceneObjectPart part in Parts) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 4fa893ab29..89f68b6058 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -5576,7 +5576,20 @@ namespace OpenSim.Region.Framework.Scenes } } - + public void UpdateAllBucketSyncInfo(long timeStamp) + { + if (m_syncEnabled) + { + foreach (KeyValuePair pair in m_bucketSyncInfoList) + { + string bucketName = pair.Key; + BucketSyncInfo syncInfo= pair.Value; + syncInfo.UpdateSyncInfo(timeStamp, m_localActorID); + m_bucketSyncTainted[bucketName] = false; + } + } + } + public Scene.ObjectUpdateResult UpdateAllProperties(SceneObjectPart updatedPart) { diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 9fe925a282..664813b20d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3817,7 +3817,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } parentPrim.HasGroupChanged = true; //parentPrim.ScheduleGroupForFullUpdate(); - //SYMMETRIC SYNC + //SYMMETRIC SYNCF if (World.RegionSyncModule != null) { parts.Add(rootPart);