diff options
Added a ForceSceneObjectBackup method to Scene, which as it says forces a database backup/update on the SceneObjectGroup.
This is now called at the beginning of DeRezObject, so we know the database is upto date before we attempt to delete a object.
Fix Mantis #1004
Which happened because Database backups don't happen if a object is still selected, so when you select a part in a link-set and then unlink it and then delete it, all without unselecting the prim at all. The unlink changes never get updated to the database. So then when the call to delete the prim from the database happens, which is called with the SceneObjectId. That SceneObjectId is never found, as the database still has that prim as part of another link set.
It is possible that these changes might have to be reverted and for us to find a different method of fixing the problem. If the performance overhead is too high or it causes any other problems.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 9c29338..5ae95ee 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -1222,7 +1222,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1222 | /// Processes backup. | 1222 | /// Processes backup. |
1223 | /// </summary> | 1223 | /// </summary> |
1224 | /// <param name="datastore"></param> | 1224 | /// <param name="datastore"></param> |
1225 | public void ProcessBackup(IRegionDataStore datastore) | 1225 | public void ProcessBackup(IRegionDataStore datastore, bool forcedBackup) |
1226 | { | 1226 | { |
1227 | if (!m_isBackedUp) | 1227 | if (!m_isBackedUp) |
1228 | return; | 1228 | return; |
@@ -1265,7 +1265,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1265 | if (HasGroupChanged) | 1265 | if (HasGroupChanged) |
1266 | { | 1266 | { |
1267 | // don't backup while it's selected or you're asking for changes mid stream. | 1267 | // don't backup while it's selected or you're asking for changes mid stream. |
1268 | if (isTimeToPersist()) | 1268 | if ((isTimeToPersist()) || (forcedBackup)) |
1269 | { | 1269 | { |
1270 | m_log.DebugFormat( | 1270 | m_log.DebugFormat( |
1271 | "[SCENE]: Storing {0}, {1} in {2}", | 1271 | "[SCENE]: Storing {0}, {1} in {2}", |