From cf24069227f9a32272c873d4423e2e11f5da25a8 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Thu, 3 Feb 2011 12:43:46 -0800 Subject: Change UpdateAgent (for changes in agent position) to be sent once to each simulator rather than once to each region. This should help with some of the delays caused by multiple outstanding requests to a single service point. --- .../Framework/Scenes/SceneCommunicationService.cs | 43 +++++++++++----------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index f8ff308..837e655 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs @@ -193,7 +193,8 @@ namespace OpenSim.Region.Framework.Scenes } } - public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, UUID scopeID, ulong regionHandle); + public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, UUID scopeID, GridRegion dest); + /// /// This informs all neighboring regions about the settings of it's child agent. @@ -202,31 +203,17 @@ namespace OpenSim.Region.Framework.Scenes /// This contains information, such as, Draw Distance, Camera location, Current Position, Current throttle settings, etc. /// /// - private void SendChildAgentDataUpdateAsync(AgentPosition cAgentData, UUID scopeID, ulong regionHandle) + private void SendChildAgentDataUpdateAsync(AgentPosition cAgentData, UUID scopeID, GridRegion dest) { //m_log.Info("[INTERGRID]: Informing neighbors about my agent in " + m_regionInfo.RegionName); try { - //m_commsProvider.InterRegion.ChildAgentUpdate(regionHandle, cAgentData); - uint x = 0, y = 0; - Utils.LongToUInts(regionHandle, out x, out y); - GridRegion destination = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); - m_scene.SimulationService.UpdateAgent(destination, cAgentData); + m_scene.SimulationService.UpdateAgent(dest, cAgentData); } catch { // Ignore; we did our best } - - //if (regionAccepted) - //{ - // //m_log.Info("[INTERGRID]: Completed sending a neighbor an update about my agent"); - //} - //else - //{ - // //m_log.Info("[INTERGRID]: Failed sending a neighbor an update about my agent"); - //} - } private void SendChildAgentDataUpdateCompleted(IAsyncResult iar) @@ -240,14 +227,28 @@ namespace OpenSim.Region.Framework.Scenes // This assumes that we know what our neighbors are. try { + uint x = 0, y = 0; + List simulatorList = new List(); foreach (ulong regionHandle in presence.KnownChildRegionHandles) { if (regionHandle != m_regionInfo.RegionHandle) { - SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync; - d.BeginInvoke(cAgentData, m_regionInfo.ScopeID, regionHandle, - SendChildAgentDataUpdateCompleted, - d); + // we only want to send one update to each simulator; the simulator will + // hand it off to the regions where a child agent exists, this does assume + // that the region position is cached or performance will degrade + Utils.LongToUInts(regionHandle, out x, out y); + GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); + if (! simulatorList.Contains(dest.ServerURI)) + { + // we havent seen this simulator before, add it to the list + // and send it an update + simulatorList.Add(dest.ServerURI); + + SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync; + d.BeginInvoke(cAgentData, m_regionInfo.ScopeID, dest, + SendChildAgentDataUpdateCompleted, + d); + } } } } -- cgit v1.1 From 034327b51fc496702b84b101123140b017bf68ff Mon Sep 17 00:00:00 2001 From: Kevin Cozens Date: Thu, 3 Feb 2011 12:03:17 -0500 Subject: Send object date to viewer in microseconds (Fixes mantis bug #3990) --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 4fcd8f5..6a92378 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -2055,8 +2055,9 @@ namespace OpenSim.Region.Framework.Scenes public void GetProperties(IClientAPI client) { + //Viewer wants date in microseconds so multiply it by 1,000,000. client.SendObjectPropertiesReply( - m_fromUserInventoryItemID, (ulong)_creationDate, _creatorID, UUID.Zero, UUID.Zero, + m_fromUserInventoryItemID, (ulong)_creationDate*(ulong)1e6, _creatorID, UUID.Zero, UUID.Zero, _groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID, ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description, ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask, -- cgit v1.1 From 98ea78fc77b3dd6da185d71dfab402a0ef8780d6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 6 Feb 2011 19:39:29 -0800 Subject: New command: show pending-objects --- OpenSim/Region/Framework/Interfaces/ISceneViewer.cs | 1 + OpenSim/Region/Framework/Scenes/SceneViewer.cs | 8 ++++++++ 2 files changed, 9 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs b/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs index 7251d57..2397f22 100644 --- a/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs +++ b/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs @@ -36,5 +36,6 @@ namespace OpenSim.Region.Framework.Interfaces void Close(); void QueuePartForUpdate(SceneObjectPart part); void SendPrimUpdates(); + int GetPendingObjectsCount(); } } diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs index b44a010..7c067ca 100644 --- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs +++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs @@ -205,6 +205,14 @@ namespace OpenSim.Region.Framework.Scenes Reset(); } + public int GetPendingObjectsCount() + { + if (m_pendingObjects != null) + return m_pendingObjects.Count; + + return 0; + } + public class ScenePartUpdate { public UUID FullID; -- cgit v1.1 From ac7bc78555c1dd51724790032f0711b24bc8c67d Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 8 Feb 2011 12:06:14 -0800 Subject: Added emergency monitoring of UDP Outgoing packets thread. Just type "emergency-monitoring on/off" --- OpenSim/Region/Framework/Scenes/Scene.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4fca261..355671c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -64,6 +64,8 @@ namespace OpenSim.Region.Framework.Scenes #region Fields + public bool EmergencyMonitoring = false; + public SynchronizeSceneHandler SynchronizeScene; public SimStatsReporter StatsReporter; public List NorthBorders = new List(); -- cgit v1.1 From 7e21c1eadf28e86b29fdd24b33e29950e195c6db Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 12 Feb 2011 00:46:01 +0000 Subject: Hack in a crude temporary "estate show" command This will show the estate for each region, along with that estate's id and the estate owner. This is temporary because the command output might change. This commit also converts the estate module from the old to the new region module format --- OpenSim/Region/Framework/Interfaces/IEstateModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/IEstateModule.cs b/OpenSim/Region/Framework/Interfaces/IEstateModule.cs index c850f7f..721f0ee 100644 --- a/OpenSim/Region/Framework/Interfaces/IEstateModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IEstateModule.cs @@ -32,7 +32,7 @@ namespace OpenSim.Region.Framework.Interfaces public delegate void ChangeDelegate(UUID regionID); public delegate void MessageDelegate(UUID regionID, UUID fromID, string fromName, string message); - public interface IEstateModule : IRegionModule + public interface IEstateModule { event ChangeDelegate OnRegionInfoChange; event ChangeDelegate OnEstateInfoChange; -- cgit v1.1