diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs index 6d9aa3891a..4012666bf7 100644 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs @@ -298,6 +298,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule if (!updated) { + /* foreach (KeyValuePair pair in part.BucketSyncInfoList) { if (pair.Value.LastUpdateActorID.Equals(m_actorID)) @@ -306,6 +307,11 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule break; } } + * */ + if (part.HasPropertyUpdatedLocally()) + { + updated = true; + } } if(updated) @@ -368,6 +374,8 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule if (primUpdates != null || presenceUpdates != null) { + long timeStamp = DateTime.Now.Ticks; + // This could be another thread for sending outgoing messages or just have the Queue functions // create and queue the messages directly into the outgoing server thread. System.Threading.ThreadPool.QueueUserWorkItem(delegate @@ -380,6 +388,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule foreach (SceneObjectGroup sog in primUpdates) { //If this is a relay node, or at least one part of the object has the last update caused by this actor, then send the update + sog.UpdateTaintedBucketSyncInfo(timeStamp); if (m_isSyncRelay || (!sog.IsDeleted && CheckObjectForSendingUpdate(sog))) { //send diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 1cfb0d776c..d81f4b08c0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -4104,6 +4104,13 @@ namespace OpenSim.Region.Framework.Scenes } + public void UpdateTaintedBucketSyncInfo(long timeStamp) + { + foreach (SceneObjectPart part in Parts) + { + part.UpdateTaintedBucketSyncInfo(timeStamp); + } + } #endregion } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 3d0f9ce4c8..3bb83d72dd 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -5391,6 +5391,18 @@ namespace OpenSim.Region.Framework.Scenes } } + public bool HasPropertyUpdatedLocally() + { + bool updatedLocally = false; + foreach (KeyValuePair pair in m_bucketSyncTainted) + { + updatedLocally = pair.Value; + if (updatedLocally) + break; + } + return updatedLocally; + } + /* public void ClearBucketTaint() { @@ -5424,6 +5436,25 @@ namespace OpenSim.Region.Framework.Scenes } } + /// + /// Update the timestamp information of each property bucket, and clear out the taint on each bucket. + /// + public void UpdateTaintedBucketSyncInfo(long timeStamp) + { + if (m_syncEnabled) + { + foreach (KeyValuePair pair in m_bucketSyncInfoList) + { + string bucketName = pair.Key; + if (m_bucketSyncTainted[bucketName]) + { + m_bucketSyncInfoList[bucketName].UpdateSyncInfo(timeStamp, m_localActorID); + m_bucketSyncTainted[bucketName] = false; + } + } + } + } + /// /// Update the timestamp and actorID information of the bucket the given property belongs to. ///