diff options
author | Justin Clarke Casey | 2008-09-16 17:30:30 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-09-16 17:30:30 +0000 |
commit | ec4189b722b86a3acca0d54a19fff7cc13c1aff2 (patch) | |
tree | 98de8f79bde607b267fdd5cbc8a6cffd95ef8e11 | |
parent | * Change XEngine default configuration values to match those in OpenSim.examp... (diff) | |
download | opensim-SC-ec4189b722b86a3acca0d54a19fff7cc13c1aff2.zip opensim-SC-ec4189b722b86a3acca0d54a19fff7cc13c1aff2.tar.gz opensim-SC-ec4189b722b86a3acca0d54a19fff7cc13c1aff2.tar.bz2 opensim-SC-ec4189b722b86a3acca0d54a19fff7cc13c1aff2.tar.xz |
* If an individual scene object throws an exception while storing, deal with this locally rather than letting it propogate up the stack
* This will allow other scene objects to persist and stop the exception taking down the whole region server
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 55 |
2 files changed, 33 insertions, 23 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 2a736fb..78c8c62 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -885,7 +885,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
885 | { | 885 | { |
886 | EventManager.TriggerOnBackup(m_storageManager.DataStore); | 886 | EventManager.TriggerOnBackup(m_storageManager.DataStore); |
887 | m_backingup = false; | 887 | m_backingup = false; |
888 | //return true; | ||
889 | } | 888 | } |
890 | 889 | ||
891 | #endregion | 890 | #endregion |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 84970c2..628db0c 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -1124,39 +1124,50 @@ namespace OpenSim.Region.Environment.Scenes | |||
1124 | #region Events | 1124 | #region Events |
1125 | 1125 | ||
1126 | /// <summary> | 1126 | /// <summary> |
1127 | /// Processes backup | 1127 | /// Processes backup. |
1128 | /// </summary> | 1128 | /// </summary> |
1129 | /// <param name="datastore"></param> | 1129 | /// <param name="datastore"></param> |
1130 | public void ProcessBackup(IRegionDataStore datastore) | 1130 | public void ProcessBackup(IRegionDataStore datastore) |
1131 | { | 1131 | { |
1132 | if (HasGroupChanged) | 1132 | // Since this is the top of the section of call stack for backing up a particular scene object, don't let |
1133 | // any exception propogate upwards. | ||
1134 | try | ||
1133 | { | 1135 | { |
1134 | // don't backup while it's selected or you're asking for changes mid stream. | 1136 | if (HasGroupChanged) |
1135 | if ((!IsSelected) && (RootPart != null)) | ||
1136 | { | 1137 | { |
1137 | m_log.InfoFormat( | 1138 | // don't backup while it's selected or you're asking for changes mid stream. |
1138 | "[SCENE]: Storing object {0}, {1} in {2}", | 1139 | if ((!IsSelected) && (RootPart != null)) |
1139 | Name, UUID, m_scene.RegionInfo.RegionName); | 1140 | { |
1141 | m_log.InfoFormat( | ||
1142 | "[SCENE]: Storing {0}, {1} in {2}", | ||
1143 | Name, UUID, m_scene.RegionInfo.RegionName); | ||
1140 | 1144 | ||
1141 | SceneObjectGroup backup_group = Copy(OwnerID, GroupID, false); | 1145 | SceneObjectGroup backup_group = Copy(OwnerID, GroupID, false); |
1142 | backup_group.RootPart.Velocity = RootPart.Velocity; | 1146 | backup_group.RootPart.Velocity = RootPart.Velocity; |
1143 | backup_group.RootPart.Acceleration = RootPart.Acceleration; | 1147 | backup_group.RootPart.Acceleration = RootPart.Acceleration; |
1144 | backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity; | 1148 | backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity; |
1145 | backup_group.RootPart.ParticleSystem = RootPart.ParticleSystem; | 1149 | backup_group.RootPart.ParticleSystem = RootPart.ParticleSystem; |
1146 | 1150 | ||
1147 | datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); | 1151 | datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); |
1148 | HasGroupChanged = false; | 1152 | HasGroupChanged = false; |
1149 | 1153 | ||
1150 | backup_group.ForEachPart(delegate(SceneObjectPart part) { part.ProcessInventoryBackup(datastore); }); | 1154 | backup_group.ForEachPart(delegate(SceneObjectPart part) { part.ProcessInventoryBackup(datastore); }); |
1151 | 1155 | ||
1152 | backup_group = null; | 1156 | backup_group = null; |
1157 | } | ||
1158 | // else | ||
1159 | // { | ||
1160 | // m_log.DebugFormat( | ||
1161 | // "[SCENE]: Did not update persistence of object {0} {1}, selected = {2}", | ||
1162 | // Name, UUID, IsSelected); | ||
1163 | // } | ||
1153 | } | 1164 | } |
1154 | // else | 1165 | } |
1155 | // { | 1166 | catch (Exception e) |
1156 | // m_log.DebugFormat( | 1167 | { |
1157 | // "[SCENE]: Did not update persistence of object {0} {1}, selected = {2}", | 1168 | m_log.ErrorFormat( |
1158 | // Name, UUID, IsSelected); | 1169 | "[SCENE]: Storing of {0}, {1} in {2} failed with exception {3}", |
1159 | // } | 1170 | Name, UUID, m_scene.RegionInfo.RegionName, e); |
1160 | } | 1171 | } |
1161 | } | 1172 | } |
1162 | 1173 | ||