diff options
author | Justin Clark-Casey (justincc) | 2010-09-07 00:34:06 +0100 |
---|---|---|
committer | Melanie | 2010-09-07 01:43:20 +0100 |
commit | 3d033520fafa1431c52086d741d1f3c7409bc6eb (patch) | |
tree | f16956aa3d2cac3ae325ffda621f2bd79b40310e /OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs | |
parent | Add test that checks correct persistence when an unlink is quickly followed b... (diff) | |
download | opensim-SC-3d033520fafa1431c52086d741d1f3c7409bc6eb.zip opensim-SC-3d033520fafa1431c52086d741d1f3c7409bc6eb.tar.gz opensim-SC-3d033520fafa1431c52086d741d1f3c7409bc6eb.tar.bz2 opensim-SC-3d033520fafa1431c52086d741d1f3c7409bc6eb.tar.xz |
Fix deletion persistence when freshly delinked prims are removed
Previously, Scene.Inventory.DeRezObjects() forced the persistence of prims before deletion.
This is necessary so that freshly delinked prims can be deleted (otherwise they remain as parts of their old group and reappear on server restart).
However, DeRezObjects() deleted to user inventory, which is not required by llDie() or direct region module unlink and deletion.
Therefore, forced persistence has been pushed down into Scene.UnlinkSceneObject() to be more general, this is still on the DeRezObjects() path.
Uncommented TestDelinkPersistence() since this now passes.
Tests required considerable elaboration of MockRegionDataPlugin to reflect underlying storing of parts.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs index 241cac0..916148b 100644 --- a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs +++ b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs | |||
@@ -111,11 +111,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
111 | 111 | ||
112 | private void InventoryRunDeleteTimer(object sender, ElapsedEventArgs e) | 112 | private void InventoryRunDeleteTimer(object sender, ElapsedEventArgs e) |
113 | { | 113 | { |
114 | m_log.Debug("[SCENE]: Starting send to inventory loop"); | 114 | m_log.Debug("[ASYNC DELETER]: Starting send to inventory loop"); |
115 | 115 | ||
116 | while (InventoryDeQueueAndDelete()) | 116 | while (InventoryDeQueueAndDelete()) |
117 | { | 117 | { |
118 | //m_log.Debug("[SCENE]: Sent item successfully to inventory, continuing..."); | 118 | //m_log.Debug("[ASYNC DELETER]: Sent item successfully to inventory, continuing..."); |
119 | } | 119 | } |
120 | } | 120 | } |
121 | 121 | ||
@@ -137,7 +137,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
137 | x = m_inventoryDeletes.Dequeue(); | 137 | x = m_inventoryDeletes.Dequeue(); |
138 | 138 | ||
139 | m_log.DebugFormat( | 139 | m_log.DebugFormat( |
140 | "[SCENE]: Sending object to user's inventory, {0} item(s) remaining.", left); | 140 | "[ASYNC DELETER]: Sending object to user's inventory, {0} item(s) remaining.", left); |
141 | 141 | ||
142 | try | 142 | try |
143 | { | 143 | { |
@@ -152,7 +152,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
152 | } | 152 | } |
153 | catch (Exception e) | 153 | catch (Exception e) |
154 | { | 154 | { |
155 | m_log.DebugFormat("Exception background sending object: " + e); | 155 | m_log.ErrorFormat( |
156 | "[ASYNC DELETER]: Exception background sending object: {0}{1}", e.Message, e.StackTrace); | ||
156 | } | 157 | } |
157 | 158 | ||
158 | return true; | 159 | return true; |
@@ -164,12 +165,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
164 | // We can't put the object group details in here since the root part may have disappeared (which is where these sit). | 165 | // We can't put the object group details in here since the root part may have disappeared (which is where these sit). |
165 | // FIXME: This needs to be fixed. | 166 | // FIXME: This needs to be fixed. |
166 | m_log.ErrorFormat( | 167 | m_log.ErrorFormat( |
167 | "[SCENE]: Queued sending of scene object to agent {0} {1} failed: {2}", | 168 | "[ASYNC DELETER]: Queued sending of scene object to agent {0} {1} failed: {2} {3}", |
168 | (x != null ? x.remoteClient.Name : "unavailable"), (x != null ? x.remoteClient.AgentId.ToString() : "unavailable"), e.ToString()); | 169 | (x != null ? x.remoteClient.Name : "unavailable"), |
170 | (x != null ? x.remoteClient.AgentId.ToString() : "unavailable"), | ||
171 | e.Message, | ||
172 | e.StackTrace); | ||
169 | } | 173 | } |
170 | 174 | ||
171 | m_log.Debug("[SCENE]: No objects left in inventory send queue."); | 175 | m_log.Debug("[ASYNC DELETER]: No objects left in inventory send queue."); |
176 | |||
172 | return false; | 177 | return false; |
173 | } | 178 | } |
174 | } | 179 | } |
175 | } | 180 | } \ No newline at end of file |