From e66668ad7edea06b3e1d52f3daceec84fd5f73f9 Mon Sep 17 00:00:00 2001 From: "Huaiyu (Kitty) Liu" Date: Tue, 15 Feb 2011 15:07:43 -0800 Subject: [PATCH 1/5] Some conflict, probably due to line ending at LocalGridServiceConnector.cs. Just commit the difference to move on. --- .../ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs index 2a10f8461d..5418b0590f 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs @@ -283,7 +283,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid return m_GridService.LookupQuark(locX, locY, actorType); } public bool CleanUpEndpoint(string syncServerID) - { + { return m_GridService.CleanUpEndpoint(syncServerID); } #endregion SYNC SERVER From 784cb6c95c5025d72c80fb6e3f94fb5a2458df08 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 25 Feb 2011 15:21:07 -0800 Subject: [PATCH 2/5] Changed some less important messages from Warn to Debug --- .../CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 6 ++---- .../RegionSync/RegionSyncModule/RegionSyncClient.cs | 2 ++ .../RegionSync/RegionSyncModule/RegionSyncServerModule.cs | 2 +- .../RegionSyncModule/SymmetricSync/RegionSyncModule.cs | 2 +- .../Connectors/SimianGrid/SimianPresenceServiceConnector.cs | 6 +++++- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index d6ddc3c337..c18f00affe 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -254,8 +254,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory /// public void QueueAppearanceSend(UUID agentid) { - // m_log.WarnFormat("[AVFACTORY]: Queue appearance send for {0}", agentid); - // 10000 ticks per millisecond, 1000 milliseconds per second long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_sendtime * 1000 * 10000); lock (m_sendqueue) @@ -263,7 +261,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory m_sendqueue[agentid] = timestamp; m_updateTimer.Start(); } - m_log.WarnFormat("[AVFACTORY]: Queue appearance send for {0} at {1} (now is {2})", agentid, timestamp,DateTime.Now.Ticks); + //m_log.DebugFormat("[AVFACTORY]: Queue appearance send for {0} at {1} (now is {2})", agentid, timestamp,DateTime.Now.Ticks); } public void QueueAppearanceSave(UUID agentid) @@ -382,7 +380,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory { if (kvp.Value < now) { - m_log.WarnFormat("[AVFACTORY]: send appearance for {0} at time {1}", kvp.Key, now); + m_log.DebugFormat("[AVFACTORY]: send appearance for {0} at time {1}", kvp.Key, now); Util.FireAndForget(delegate(object o) { HandleAppearanceSend(kvp.Key); }); m_sendqueue.Remove(kvp.Key); } diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncClient.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncClient.cs index 3040866e46..8777bcc134 100644 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncClient.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncClient.cs @@ -770,11 +770,13 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule sp.ControllingClient.SendAnimations(animIDs, seqs, sourceAgentID, objectIDs); } } + /* else { m_log.WarnFormat("{0} Could not send animation for {1} because scene presence not found", LogHeader(), agentID.ToString()); } + */ return; } case RegionSyncMessage.MsgType.BalanceClientLoad: diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncServerModule.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncServerModule.cs index be029d4687..ba5c7efca5 100644 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncServerModule.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncServerModule.cs @@ -282,7 +282,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule // Existing value of 1 indicates that updates are currently being sent so skip updates this pass if (Interlocked.Exchange(ref m_sendingUpdates, 1) == 1) { - m_log.WarnFormat("[REGION SYNC SERVER MODULE] SendUpdates(): An update thread is already running."); + m_log.DebugFormat("[REGION SYNC SERVER MODULE] SendUpdates(): An update thread is already running."); return; } diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs index 318efda12f..1d3219c90c 100644 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs @@ -213,7 +213,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule // Existing value of 1 indicates that updates are currently being sent so skip updates this pass if (Interlocked.Exchange(ref m_sendingUpdates, 1) == 1) { - m_log.WarnFormat("[REGION SYNC MODULE] SendUpdates(): An update thread is already running."); + m_log.DebugFormat("[REGION SYNC MODULE] SendUpdates(): An update thread is already running."); return; } diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs index 678f738abb..6d9f6185ac 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs @@ -203,7 +203,11 @@ namespace OpenSim.Services.Connectors.SimianGrid public PresenceInfo GetAgent(UUID sessionID) { // m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent with sessionID " + sessionID); - + if(sessionID == UUID.Zero) + { + m_log.Debug("[SIMIAN PRESENCE CONNECTOR]: GetAgent called with UUID.Zero!"); + return null; + } NameValueCollection requestArgs = new NameValueCollection { { "RequestMethod", "GetSession" }, From 153fd02f0f7d2948f972450465fced23403d0708 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 25 Feb 2011 16:03:35 -0800 Subject: [PATCH 3/5] Add SimianGridServiceConnector::LookupEndpoint to get info on a particular sync server endpoint --- .../SimianGrid/SimianGridServiceConnector.cs | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index d535bb4754..682ab0e042 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs @@ -434,6 +434,12 @@ namespace OpenSim.Services.Connectors.SimianGrid } #region SYNC SERVER + /// + /// Register the SyncServerID, address and port for a particular endpoint. + /// The internal address and port are not registered. + /// + /// + /// 'true' if the registration was successful and 'false' otherwise public virtual bool RegisterEndpoint(GridEndpointInfo gei) { NameValueCollection requestArgs = new NameValueCollection @@ -456,6 +462,42 @@ namespace OpenSim.Services.Connectors.SimianGrid return false; } + /// + /// Lookup a particular endpoint given the SyncServerID of the endpoint. + /// + /// + /// endpoint information or 'null' if not found + public virtual GridEndpointInfo LookupEndpoint(string syncServerID) + { + NameValueCollection requestArgs = new NameValueCollection + { + { "RequestMethod", "GetEndpoint" }, + { "SyncServerID", syncServerID }, + }; + + OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs); + if (response["Success"].AsBoolean()) + { + GridEndpointInfo gai = new GridEndpointInfo(); + gai.syncServerID = response["SyncServerID"].AsString(); + gai.address = response["Address"].AsString(); + gai.port = (uint)response["Port"].AsInteger(); + gai.internalAddress = response["InternalAddress"].AsString(); + gai.internalPort = (uint)response["InternalPort"].AsInteger(); + return gai; + } + m_log.ErrorFormat("{0}: Lookup of endpoint failed: {1}", + "[SIMIAN GRID CONNECTOR]", response["Message"]); + return null; + } + + /// + /// Register an actor association with a SyncServer. + /// + /// unique identification of the actor (actor's "name") + /// actor type identification string + /// sync server identification + /// 'true' if registration successful. 'false' otherwise public virtual bool RegisterActor(string actorID, string actorType, string syncServerID) { NameValueCollection requestArgs = new NameValueCollection @@ -479,6 +521,13 @@ namespace OpenSim.Services.Connectors.SimianGrid return false; } + /// + /// Register a quark on a SyncServer. + /// + /// + /// + /// + /// 'true' if registration successful. 'false' otherwise public virtual bool RegisterQuark(string syncServerID, uint locX, uint locY) { NameValueCollection requestArgs = new NameValueCollection @@ -501,6 +550,12 @@ namespace OpenSim.Services.Connectors.SimianGrid return false; } + /// + /// Given a quark location, return all the endpoints associated with that quark; + /// + /// quark home X location + /// quark home Y location + /// list of endpoints and actor types associated with the quark public virtual List LookupQuark(uint locX, uint locY) { NameValueCollection requestArgs = new NameValueCollection @@ -512,6 +567,15 @@ namespace OpenSim.Services.Connectors.SimianGrid return LookupQuark(requestArgs); } + /// + /// Given a quark location and an actor type, return all endpoints associated with + /// the quark that have that actor. This is equivilent to the previous request but + /// filtered by the actor type. + /// + /// quark home X location + /// quark home Y location + /// actor definition string + /// list of endpoints having that actor and the quark public virtual List LookupQuark(uint locX, uint locY, string actorType) { NameValueCollection requestArgs = new NameValueCollection From 9d613a20c0dc7162d70c0987d7866d6a2d0f74ba Mon Sep 17 00:00:00 2001 From: "Huaiyu (Kitty) Liu" Date: Fri, 25 Feb 2011 16:20:58 -0800 Subject: [PATCH 4/5] Relocate functions within RegionSyncModule.cs: the IRegionSyncModule region now only contains functions defined in IRegionSyncModule. --- OpenSim/Framework/Constants.cs | 3 +- .../SymmetricSync/RegionSyncModule.cs | 283 +++++++++--------- 2 files changed, 144 insertions(+), 142 deletions(-) diff --git a/OpenSim/Framework/Constants.cs b/OpenSim/Framework/Constants.cs index 1b1aaf2bc4..cdef2ded75 100644 --- a/OpenSim/Framework/Constants.cs +++ b/OpenSim/Framework/Constants.cs @@ -30,7 +30,8 @@ namespace OpenSim.Framework { public class Constants { - public const uint RegionSize = 256; + //public const uint RegionSize = 256; + public const uint RegionSize = 512; public const byte TerrainPatchSize = 16; public const string DefaultTexture = "89556747-24cb-43ed-920b-47caed15465f"; diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs index 51fed7c2c8..9e29cc99cb 100644 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs @@ -193,147 +193,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule get { return m_propertyBucketNames; } } - private RegionSyncListener m_localSyncListener = null; - private bool m_synced = false; - - // Lock is used to synchronize access to the update status and update queues - //private object m_updateSceneObjectPartLock = new object(); - //private Dictionary m_primUpdates = new Dictionary(); - private Dictionary m_primUpdateLocks = new Dictionary(); - private Dictionary> m_primUpdates = new Dictionary>(); - - private delegate void PrimUpdatePerBucketSender(string bucketName, List primUpdates); - private Dictionary m_primUpdatesPerBucketSender = new Dictionary(); - - private object m_updateScenePresenceLock = new object(); - private Dictionary m_presenceUpdates = new Dictionary(); - private int m_sendingUpdates=0; - - private int m_maxNumOfPropertyBuckets; - - //Read in configuration for which property-bucket each property belongs to, and the description of each bucket - private void PopulatePropertyBucketMap(IConfig config) - { - //We start with a default bucket map. Will add the code to read in configuration from config files later. - PopulatePropertyBuketMapByDefault(); - - //Pass the bucket information to SceneObjectPart. - SceneObjectPart.InitializePropertyBucketInfo(m_primPropertyBucketMap, m_propertyBucketNames, m_actorID); - - } - - //As of current version, we still use the xml serialization as most of SOP's properties are in the General bucket. - //Going forward, we may serialize the properties differently, e.g. using OSDMap - private void PrimUpdatesGeneralBucketSender(string bucketName, List primUpdates) - { - Dictionary updatedObjects = new Dictionary(); - foreach (SceneObjectPart part in primUpdates) - { - updatedObjects[part.ParentGroup.UUID] = part.ParentGroup; - } - foreach (SceneObjectGroup sog in updatedObjects.Values) - { - sog.UpdateTaintedBucketSyncInfo(bucketName, DateTime.Now.Ticks); //this update the timestamp and clear the taint info of the bucket - string sogxml = SceneObjectSerializer.ToXml2Format(sog); - SymmetricSyncMessage syncMsg = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.UpdatedObject, sogxml); - SendObjectUpdateToRelevantSyncConnectors(sog, syncMsg); - } - } - - private void PrimUpdatesPhysicsBucketSender(string bucketName, List primUpdates) - { - foreach (SceneObjectPart updatedPart in primUpdates) - { - updatedPart.UpdateTaintedBucketSyncInfo(bucketName, DateTime.Now.Ticks); - - OSDMap data = new OSDMap(); - - data["UUID"] = OSD.FromUUID(updatedPart.UUID); - data["Bucket"] = OSD.FromString(bucketName); - - data["GroupPosition"] = OSD.FromVector3(updatedPart.GroupPosition); - data["OffsetPosition"] = OSD.FromVector3(updatedPart.OffsetPosition); - data["RotationOffset"] = OSD.FromQuaternion(updatedPart.RotationOffset); - data["Velocity"] = OSD.FromVector3(updatedPart.Velocity); - data["Scale"] = OSD.FromVector3(updatedPart.Scale); - //Other properties to be included - /* - "Position": - "Size": - "Force": - "RotationalVelocity": - "PA_Acceleration": - "Torque": - "Orientation": - "IsPhysical": - "Flying": - "Buoyancy": - * */ - - data["LastUpdateTimeStamp"] = OSD.FromLong(updatedPart.BucketSyncInfoList[bucketName].LastUpdateTimeStamp); - data["LastUpdateActorID"] = OSD.FromString(updatedPart.BucketSyncInfoList[bucketName].LastUpdateActorID); - - SymmetricSyncMessage syncMsg = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.UpdatedBucketProperties, OSDParser.SerializeJsonString(data)); - SendObjectUpdateToRelevantSyncConnectors(updatedPart, syncMsg); - } - } - - //If nothing configured in the config file, this is the default settings for grouping properties into different bucket - private void PopulatePropertyBuketMapByDefault() - { - //by default, there are two property buckets: the "General" bucket and the "Physics" bucket. - string generalBucketName = "General"; - string physicsBucketName = "Physics"; - m_propertyBucketNames.Add(generalBucketName); - m_propertyBucketNames.Add(physicsBucketName); - m_maxNumOfPropertyBuckets = m_propertyBucketNames.Count; - - //Linking each bucket with the sender function that serializes the properties in the bucket and send out sync message - m_primUpdatesPerBucketSender.Add("General", PrimUpdatesGeneralBucketSender); - m_primUpdatesPerBucketSender.Add("Physics", PrimUpdatesPhysicsBucketSender); - - //Mapping properties to buckets. - foreach (SceneObjectPartProperties property in Enum.GetValues(typeof(SceneObjectPartProperties))) - { - switch (property) - { - case SceneObjectPartProperties.GroupPosition: - case SceneObjectPartProperties.OffsetPosition: - case SceneObjectPartProperties.Scale: - case SceneObjectPartProperties.Velocity: - case SceneObjectPartProperties.AngularVelocity: - case SceneObjectPartProperties.RotationOffset: - case SceneObjectPartProperties.Position: - case SceneObjectPartProperties.Size: - case SceneObjectPartProperties.Force: - case SceneObjectPartProperties.RotationalVelocity: - case SceneObjectPartProperties.PA_Acceleration: - case SceneObjectPartProperties.Torque: - case SceneObjectPartProperties.Orientation: - case SceneObjectPartProperties.IsPhysical: - case SceneObjectPartProperties.Flying: - case SceneObjectPartProperties.Buoyancy: - m_primPropertyBucketMap.Add(property, physicsBucketName); - break; - default: - //all other properties belong to the "General" bucket. - m_primPropertyBucketMap.Add(property, generalBucketName); - break; - } - } - - //create different lists to keep track which SOP has what properties updated (which bucket of properties) - foreach (string bucketName in m_propertyBucketNames) - { - m_primUpdates.Add(bucketName, new Dictionary()); - m_primUpdateLocks.Add(bucketName, new Object()); - } - } - - private bool IsSyncingWithOtherActors() - { - return (m_syncConnectors.Count > 0); - } public void QueueSceneObjectPartForUpdate(SceneObjectPart part) { @@ -805,12 +664,154 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule //Timers for periodically status report has not been implemented yet. private System.Timers.Timer m_statsTimer = new System.Timers.Timer(1000); + + private RegionSyncListener m_localSyncListener = null; + private bool m_synced = false; + + // Lock is used to synchronize access to the update status and update queues + //private object m_updateSceneObjectPartLock = new object(); + //private Dictionary m_primUpdates = new Dictionary(); + private Dictionary m_primUpdateLocks = new Dictionary(); + private Dictionary> m_primUpdates = new Dictionary>(); + + private delegate void PrimUpdatePerBucketSender(string bucketName, List primUpdates); + private Dictionary m_primUpdatesPerBucketSender = new Dictionary(); + + private object m_updateScenePresenceLock = new object(); + private Dictionary m_presenceUpdates = new Dictionary(); + private int m_sendingUpdates = 0; + + private int m_maxNumOfPropertyBuckets; + private void StatsTimerElapsed(object source, System.Timers.ElapsedEventArgs e) { //TO BE IMPLEMENTED m_log.Warn("[REGION SYNC MODULE]: StatsTimerElapsed -- NOT yet implemented."); } + //Read in configuration for which property-bucket each property belongs to, and the description of each bucket + private void PopulatePropertyBucketMap(IConfig config) + { + //We start with a default bucket map. Will add the code to read in configuration from config files later. + PopulatePropertyBuketMapByDefault(); + + //Pass the bucket information to SceneObjectPart. + SceneObjectPart.InitializePropertyBucketInfo(m_primPropertyBucketMap, m_propertyBucketNames, m_actorID); + } + + //As of current version, we still use the xml serialization as most of SOP's properties are in the General bucket. + //Going forward, we may serialize the properties differently, e.g. using OSDMap + private void PrimUpdatesGeneralBucketSender(string bucketName, List primUpdates) + { + Dictionary updatedObjects = new Dictionary(); + foreach (SceneObjectPart part in primUpdates) + { + updatedObjects[part.ParentGroup.UUID] = part.ParentGroup; + } + foreach (SceneObjectGroup sog in updatedObjects.Values) + { + sog.UpdateTaintedBucketSyncInfo(bucketName, DateTime.Now.Ticks); //this update the timestamp and clear the taint info of the bucket + string sogxml = SceneObjectSerializer.ToXml2Format(sog); + SymmetricSyncMessage syncMsg = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.UpdatedObject, sogxml); + SendObjectUpdateToRelevantSyncConnectors(sog, syncMsg); + } + } + + private void PrimUpdatesPhysicsBucketSender(string bucketName, List primUpdates) + { + foreach (SceneObjectPart updatedPart in primUpdates) + { + updatedPart.UpdateTaintedBucketSyncInfo(bucketName, DateTime.Now.Ticks); + + OSDMap data = new OSDMap(); + + data["UUID"] = OSD.FromUUID(updatedPart.UUID); + data["Bucket"] = OSD.FromString(bucketName); + + data["GroupPosition"] = OSD.FromVector3(updatedPart.GroupPosition); + data["OffsetPosition"] = OSD.FromVector3(updatedPart.OffsetPosition); + data["RotationOffset"] = OSD.FromQuaternion(updatedPart.RotationOffset); + data["Velocity"] = OSD.FromVector3(updatedPart.Velocity); + data["Scale"] = OSD.FromVector3(updatedPart.Scale); + //Other properties to be included + /* + "Position": + "Size": + "Force": + "RotationalVelocity": + "PA_Acceleration": + "Torque": + "Orientation": + "IsPhysical": + "Flying": + "Buoyancy": + * */ + + data["LastUpdateTimeStamp"] = OSD.FromLong(updatedPart.BucketSyncInfoList[bucketName].LastUpdateTimeStamp); + data["LastUpdateActorID"] = OSD.FromString(updatedPart.BucketSyncInfoList[bucketName].LastUpdateActorID); + + SymmetricSyncMessage syncMsg = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.UpdatedBucketProperties, OSDParser.SerializeJsonString(data)); + SendObjectUpdateToRelevantSyncConnectors(updatedPart, syncMsg); + } + } + + //If nothing configured in the config file, this is the default settings for grouping properties into different bucket + private void PopulatePropertyBuketMapByDefault() + { + //by default, there are two property buckets: the "General" bucket and the "Physics" bucket. + string generalBucketName = "General"; + string physicsBucketName = "Physics"; + m_propertyBucketNames.Add(generalBucketName); + m_propertyBucketNames.Add(physicsBucketName); + m_maxNumOfPropertyBuckets = m_propertyBucketNames.Count; + + //Linking each bucket with the sender function that serializes the properties in the bucket and send out sync message + m_primUpdatesPerBucketSender.Add("General", PrimUpdatesGeneralBucketSender); + m_primUpdatesPerBucketSender.Add("Physics", PrimUpdatesPhysicsBucketSender); + + //Mapping properties to buckets. + foreach (SceneObjectPartProperties property in Enum.GetValues(typeof(SceneObjectPartProperties))) + { + switch (property) + { + case SceneObjectPartProperties.GroupPosition: + case SceneObjectPartProperties.OffsetPosition: + case SceneObjectPartProperties.Scale: + case SceneObjectPartProperties.Velocity: + case SceneObjectPartProperties.AngularVelocity: + case SceneObjectPartProperties.RotationOffset: + case SceneObjectPartProperties.Position: + case SceneObjectPartProperties.Size: + case SceneObjectPartProperties.Force: + case SceneObjectPartProperties.RotationalVelocity: + case SceneObjectPartProperties.PA_Acceleration: + case SceneObjectPartProperties.Torque: + case SceneObjectPartProperties.Orientation: + case SceneObjectPartProperties.IsPhysical: + case SceneObjectPartProperties.Flying: + case SceneObjectPartProperties.Buoyancy: + m_primPropertyBucketMap.Add(property, physicsBucketName); + break; + default: + //all other properties belong to the "General" bucket. + m_primPropertyBucketMap.Add(property, generalBucketName); + break; + } + } + + //create different lists to keep track which SOP has what properties updated (which bucket of properties) + foreach (string bucketName in m_propertyBucketNames) + { + m_primUpdates.Add(bucketName, new Dictionary()); + m_primUpdateLocks.Add(bucketName, new Object()); + } + } + + private bool IsSyncingWithOtherActors() + { + return (m_syncConnectors.Count > 0); + } + //Object updates are sent by enqueuing into each connector's outQueue. private void SendObjectUpdateToRelevantSyncConnectors(SceneObjectGroup sog, SymmetricSyncMessage syncMsg) { From 91e8fc50d3bc9873a4c784197f989c2a8f7d1ab4 Mon Sep 17 00:00:00 2001 From: "Huaiyu (Kitty) Liu" Date: Tue, 1 Mar 2011 14:50:33 -0800 Subject: [PATCH 5/5] Change Constants.RegionSize back to 256. --- OpenSim/Framework/Constants.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OpenSim/Framework/Constants.cs b/OpenSim/Framework/Constants.cs index cdef2ded75..1b1aaf2bc4 100644 --- a/OpenSim/Framework/Constants.cs +++ b/OpenSim/Framework/Constants.cs @@ -30,8 +30,7 @@ namespace OpenSim.Framework { public class Constants { - //public const uint RegionSize = 256; - public const uint RegionSize = 512; + public const uint RegionSize = 256; public const byte TerrainPatchSize = 16; public const string DefaultTexture = "89556747-24cb-43ed-920b-47caed15465f";