aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorUbitUmarov2017-06-24 02:01:48 +0100
committerUbitUmarov2017-06-24 02:01:48 +0100
commit191661b51d31254419e9b442ec12953772821ac3 (patch)
tree41e32cf5889e96e6284677809ca2230b8066fdad /OpenSim/Region/CoreModules
parent code actually has no ideia if a id is a asset or not and does try to handle ... (diff)
downloadopensim-SC_OLD-191661b51d31254419e9b442ec12953772821ac3.zip
opensim-SC_OLD-191661b51d31254419e9b442ec12953772821ac3.tar.gz
opensim-SC_OLD-191661b51d31254419e9b442ec12953772821ac3.tar.bz2
opensim-SC_OLD-191661b51d31254419e9b442ec12953772821ac3.tar.xz
a few more changes to iar/oar assets save error/warning to show problems known to be asset errors
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs18
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs24
2 files changed, 26 insertions, 16 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
index d816ba4..ad46107 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
@@ -223,10 +223,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
223 if (SaveAssets && itemAssetType != AssetType.Link && itemAssetType != AssetType.LinkFolder) 223 if (SaveAssets && itemAssetType != AssetType.Link && itemAssetType != AssetType.LinkFolder)
224 { 224 {
225 int curErrorCntr = m_assetGatherer.ErrorCount; 225 int curErrorCntr = m_assetGatherer.ErrorCount;
226 int possible = m_assetGatherer.possibleNotAssetCount;
226 m_assetGatherer.AddForInspection(inventoryItem.AssetID); 227 m_assetGatherer.AddForInspection(inventoryItem.AssetID);
227 m_assetGatherer.GatherAll(); 228 m_assetGatherer.GatherAll();
228 curErrorCntr = m_assetGatherer.ErrorCount - curErrorCntr; 229 curErrorCntr = m_assetGatherer.ErrorCount - curErrorCntr;
229 if(curErrorCntr > 0) 230 possible = m_assetGatherer.possibleNotAssetCount - possible;
231
232 if(curErrorCntr > 0 || possible > 0)
230 { 233 {
231 string spath; 234 string spath;
232 int indx = path.IndexOf("__"); 235 int indx = path.IndexOf("__");
@@ -235,15 +238,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
235 else 238 else
236 spath = path; 239 spath = path;
237 240
238 if(curErrorCntr > 1) 241 if(curErrorCntr > 0)
239 { 242 {
240 m_log.WarnFormat("[INVENTORY ARCHIVER Warning]: item {0} '{1}', type {2}, in '{3}', contains {4} references to possible missing or damaged assets )", 243 m_log.ErrorFormat("[INVENTORY ARCHIVER Warning]: item {0} '{1}', type {2}, in '{3}', contains {4} references to missing or damaged assets",
241 inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath, curErrorCntr); 244 inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath, curErrorCntr);
245 if(possible > 0)
246 m_log.WarnFormat("[INVENTORY ARCHIVER Warning]: item also contains {0} references that may be to missing or damaged assets or not a problem", possible);
242 } 247 }
243 else if(curErrorCntr == 1) 248 else if(possible > 0)
244 { 249 {
245 m_log.WarnFormat("[INVENTORY ARCHIVER Warning]: item {0} '{1}', type {2}, in '{3}', contains a reference to a possible missing or damaged asset)", 250 m_log.WarnFormat("[INVENTORY ARCHIVER Warning]: item {0} '{1}', type {2}, in '{3}', contains {4} references that may be to missing or damaged assets or not a problem", inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath, possible);
246 inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath);
247 } 251 }
248 } 252 }
249 } 253 }
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
index 0ed3399..11c53d7 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
@@ -182,11 +182,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver
182 182
183 Dictionary<UUID, sbyte> assetUuids = new Dictionary<UUID, sbyte>(); 183 Dictionary<UUID, sbyte> assetUuids = new Dictionary<UUID, sbyte>();
184 HashSet<UUID> failedIDs = new HashSet<UUID>(); 184 HashSet<UUID> failedIDs = new HashSet<UUID>();
185 HashSet<UUID> uncertainAssetsUUIDs = new HashSet<UUID>();
185 186
186 scenesGroup.ForEachScene(delegate(Scene scene) 187 scenesGroup.ForEachScene(delegate(Scene scene)
187 { 188 {
188 string regionDir = MultiRegionFormat ? scenesGroup.GetRegionDir(scene.RegionInfo.RegionID) : ""; 189 string regionDir = MultiRegionFormat ? scenesGroup.GetRegionDir(scene.RegionInfo.RegionID) : "";
189 ArchiveOneRegion(scene, regionDir, assetUuids, failedIDs); 190 ArchiveOneRegion(scene, regionDir, assetUuids, failedIDs, uncertainAssetsUUIDs);
190 }); 191 });
191 192
192 // Archive the assets 193 // Archive the assets
@@ -217,7 +218,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
217 } 218 }
218 } 219 }
219 220
220 private void ArchiveOneRegion(Scene scene, string regionDir, Dictionary<UUID, sbyte> assetUuids, HashSet<UUID> failedIDs) 221 private void ArchiveOneRegion(Scene scene, string regionDir, Dictionary<UUID, sbyte> assetUuids,
222 HashSet<UUID> failedIDs, HashSet<UUID> uncertainAssetsUUIDs)
221 { 223 {
222 m_log.InfoFormat("[ARCHIVER]: Writing region {0}", scene.Name); 224 m_log.InfoFormat("[ARCHIVER]: Writing region {0}", scene.Name);
223 225
@@ -253,24 +255,28 @@ namespace OpenSim.Region.CoreModules.World.Archiver
253 255
254 if (SaveAssets) 256 if (SaveAssets)
255 { 257 {
256 UuidGatherer assetGatherer = new UuidGatherer(scene.AssetService, assetUuids, failedIDs); 258 UuidGatherer assetGatherer = new UuidGatherer(scene.AssetService, assetUuids, failedIDs, uncertainAssetsUUIDs);
257 int prevAssets = assetUuids.Count; 259 int prevAssets = assetUuids.Count;
258 260
259 foreach (SceneObjectGroup sceneObject in sceneObjects) 261 foreach (SceneObjectGroup sceneObject in sceneObjects)
260 { 262 {
261 int curErrorCntr = assetGatherer.ErrorCount; 263 int curErrorCntr = assetGatherer.ErrorCount;
264 int possible = assetGatherer.possibleNotAssetCount;
262 assetGatherer.AddForInspection(sceneObject); 265 assetGatherer.AddForInspection(sceneObject);
263 assetGatherer.GatherAll(); 266 assetGatherer.GatherAll();
264 curErrorCntr = assetGatherer.ErrorCount - curErrorCntr; 267 curErrorCntr = assetGatherer.ErrorCount - curErrorCntr;
265 if(curErrorCntr > 1) 268 possible = assetGatherer.possibleNotAssetCount - possible;
269 if(curErrorCntr > 0)
266 { 270 {
267 m_log.WarnFormat("[ARCHIVER Warning]: object {0} '{1}', at {2}, contains {3} references to possible missing or damaged assets", 271 m_log.ErrorFormat("[ARCHIVER]: object {0} '{1}', at {2}, contains {3} references to missing or damaged assets",
268 sceneObject.UUID, sceneObject.Name ,sceneObject.AbsolutePosition.ToString(), curErrorCntr); 272 sceneObject.UUID, sceneObject.Name ,sceneObject.AbsolutePosition.ToString(), curErrorCntr);
273 if(possible > 0)
274 m_log.WarnFormat("[ARCHIVER Warning]: object also contains {0} references that may be to missing or damaged assets or not a problem", possible);
269 } 275 }
270 else if(curErrorCntr == 1) 276 else if(possible > 0)
271 { 277 {
272 m_log.WarnFormat("[ARCHIVER Warning]: object {0} '{1}', at {2}, contains a reference to a possible missing or damaged assets", 278 m_log.WarnFormat("[ARCHIVER Warning]: object {0} '{1}', at {2}, contains {3} references that may be to missing or damaged assets or not a problem",
273 sceneObject.UUID, sceneObject.Name, sceneObject.AbsolutePosition.ToString()); 279 sceneObject.UUID, sceneObject.Name ,sceneObject.AbsolutePosition.ToString(), possible);
274 } 280 }
275 } 281 }
276 282