diff options
author | UbitUmarov | 2017-06-23 17:23:28 +0100 |
---|---|---|
committer | UbitUmarov | 2017-06-23 17:23:28 +0100 |
commit | 95595a8360f5d689dc1f680d53773866a9723f84 (patch) | |
tree | c0fe7369b599ffbd93e0eb040f7be6795f6fe67b | |
parent | several changes to iar/oar assets error reports (diff) | |
download | opensim-SC-95595a8360f5d689dc1f680d53773866a9723f84.zip opensim-SC-95595a8360f5d689dc1f680d53773866a9723f84.tar.gz opensim-SC-95595a8360f5d689dc1f680d53773866a9723f84.tar.bz2 opensim-SC-95595a8360f5d689dc1f680d53773866a9723f84.tar.xz |
coment out missing or damage assets messages in uuidgather that are not very usefull. In IAR save display information about items that contain references to broken assets. Note that as explained on mantis 8195 this can't will not detect all problems
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | 29 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/UuidGatherer.cs | 25 |
2 files changed, 42 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 144cbbe..f89b904 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | |||
@@ -218,10 +218,35 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
218 | 218 | ||
219 | // Count inventory items (different to asset count) | 219 | // Count inventory items (different to asset count) |
220 | CountItems++; | 220 | CountItems++; |
221 | 221 | ||
222 | // Don't chase down link asset items as they actually point to their target item IDs rather than an asset | 222 | // Don't chase down link asset items as they actually point to their target item IDs rather than an asset |
223 | if (SaveAssets && itemAssetType != AssetType.Link && itemAssetType != AssetType.LinkFolder) | 223 | if (SaveAssets && itemAssetType != AssetType.Link && itemAssetType != AssetType.LinkFolder) |
224 | { | ||
225 | int curErrorCntr = m_assetGatherer.ErrorCount; | ||
224 | m_assetGatherer.AddForInspection(inventoryItem.AssetID); | 226 | m_assetGatherer.AddForInspection(inventoryItem.AssetID); |
227 | m_assetGatherer.GatherAll(); | ||
228 | curErrorCntr = m_assetGatherer.ErrorCount - curErrorCntr; | ||
229 | if(curErrorCntr > 0) | ||
230 | { | ||
231 | string spath; | ||
232 | int indx = path.IndexOf("__"); | ||
233 | if(indx > 0) | ||
234 | spath = path.Substring(0,indx); | ||
235 | else | ||
236 | spath = path; | ||
237 | |||
238 | if(curErrorCntr > 1) | ||
239 | { | ||
240 | m_log.WarnFormat("[INVENTORY ARCHIVER]: item {0} '{1}', type {2}, in '{3}', contains at least {4} references to missing or damaged assets", | ||
241 | inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath, curErrorCntr); | ||
242 | } | ||
243 | else if(curErrorCntr == 1) | ||
244 | { | ||
245 | m_log.WarnFormat("[INVENTORY ARCHIVER]: item {0} '{1}', type {2}, in '{3}', contains at least 1 reference to a missing or damaged asset", | ||
246 | inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath); | ||
247 | } | ||
248 | } | ||
249 | } | ||
225 | } | 250 | } |
226 | 251 | ||
227 | /// <summary> | 252 | /// <summary> |
@@ -427,7 +452,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
427 | m_log.DebugFormat( | 452 | m_log.DebugFormat( |
428 | "[INVENTORY ARCHIVER]: The items to save reference {0} assets", m_assetGatherer.GatheredUuids.Count + errors); | 453 | "[INVENTORY ARCHIVER]: The items to save reference {0} assets", m_assetGatherer.GatheredUuids.Count + errors); |
429 | if(errors > 0) | 454 | if(errors > 0) |
430 | m_log.DebugFormat("[INVENTORY ARCHIVER]: {0} of this assets have problems and will be ignored", errors); | 455 | m_log.DebugFormat("[INVENTORY ARCHIVER]: {0} of these assets have problems and will be ignored", errors); |
431 | 456 | ||
432 | AssetsRequest ar = new AssetsRequest( | 457 | AssetsRequest ar = new AssetsRequest( |
433 | new AssetsArchiver(m_archiveWriter), | 458 | new AssetsArchiver(m_archiveWriter), |
diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index 548aa3a..46ce2ce 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs | |||
@@ -66,7 +66,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
66 | /// <value>The gathered uuids.</value> | 66 | /// <value>The gathered uuids.</value> |
67 | public IDictionary<UUID, sbyte> GatheredUuids { get; private set; } | 67 | public IDictionary<UUID, sbyte> GatheredUuids { get; private set; } |
68 | public HashSet<UUID> FailedUUIDs { get; private set; } | 68 | public HashSet<UUID> FailedUUIDs { get; private set; } |
69 | 69 | public int ErrorCount { get; private set; } | |
70 | /// <summary> | 70 | /// <summary> |
71 | /// Gets the next UUID to inspect. | 71 | /// Gets the next UUID to inspect. |
72 | /// </summary> | 72 | /// </summary> |
@@ -103,7 +103,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
103 | /// Asset service. | 103 | /// Asset service. |
104 | /// </param> | 104 | /// </param> |
105 | /// <param name="collector"> | 105 | /// <param name="collector"> |
106 | /// Gathered UUIDs will be collected in this dictinaory. | 106 | /// Gathered UUIDs will be collected in this dictionary. |
107 | /// It can be pre-populated if you want to stop the gatherer from analyzing assets that have already been fetched and inspected. | 107 | /// It can be pre-populated if you want to stop the gatherer from analyzing assets that have already been fetched and inspected. |
108 | /// </param> | 108 | /// </param> |
109 | public UuidGatherer(IAssetService assetService, IDictionary<UUID, sbyte> collector, HashSet <UUID> failedIDs) | 109 | public UuidGatherer(IAssetService assetService, IDictionary<UUID, sbyte> collector, HashSet <UUID> failedIDs) |
@@ -114,6 +114,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
114 | // FIXME: Not efficient for searching, can improve. | 114 | // FIXME: Not efficient for searching, can improve. |
115 | m_assetUuidsToInspect = new Queue<UUID>(); | 115 | m_assetUuidsToInspect = new Queue<UUID>(); |
116 | FailedUUIDs = failedIDs; | 116 | FailedUUIDs = failedIDs; |
117 | ErrorCount = 0; | ||
117 | } | 118 | } |
118 | 119 | ||
119 | /// <summary> | 120 | /// <summary> |
@@ -232,9 +233,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
232 | catch (Exception e) | 233 | catch (Exception e) |
233 | { | 234 | { |
234 | m_log.ErrorFormat("[UUID GATHERER]: Failed to get part - {0}", e); | 235 | m_log.ErrorFormat("[UUID GATHERER]: Failed to get part - {0}", e); |
235 | m_log.DebugFormat( | ||
236 | "[UUID GATHERER]: Texture entry length for prim was {0} (min is 46)", | ||
237 | part.Shape.TextureEntry.Length); | ||
238 | } | 236 | } |
239 | } | 237 | } |
240 | } | 238 | } |
@@ -286,14 +284,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
286 | private void GetAssetUuids(UUID assetUuid) | 284 | private void GetAssetUuids(UUID assetUuid) |
287 | { | 285 | { |
288 | if(FailedUUIDs.Contains(assetUuid)) | 286 | if(FailedUUIDs.Contains(assetUuid)) |
287 | { | ||
288 | ErrorCount++; | ||
289 | return; | 289 | return; |
290 | } | ||
290 | 291 | ||
291 | // avoid infinite loops | 292 | // avoid infinite loops |
292 | if (GatheredUuids.ContainsKey(assetUuid)) | 293 | if (GatheredUuids.ContainsKey(assetUuid)) |
293 | { | ||
294 | FailedUUIDs.Add(assetUuid); | ||
295 | return; | 294 | return; |
296 | } | ||
297 | 295 | ||
298 | AssetBase assetBase; | 296 | AssetBase assetBase; |
299 | try | 297 | try |
@@ -303,13 +301,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
303 | catch (Exception e) | 301 | catch (Exception e) |
304 | { | 302 | { |
305 | m_log.ErrorFormat("[UUID GATHERER]: Failed to get asset {0} : {1}", assetUuid, e.Message); | 303 | m_log.ErrorFormat("[UUID GATHERER]: Failed to get asset {0} : {1}", assetUuid, e.Message); |
304 | ErrorCount++; | ||
306 | FailedUUIDs.Add(assetUuid); | 305 | FailedUUIDs.Add(assetUuid); |
307 | return; | 306 | return; |
308 | } | 307 | } |
309 | 308 | ||
310 | if(assetBase == null) | 309 | if(assetBase == null) |
311 | { | 310 | { |
312 | m_log.ErrorFormat("[UUID GATHERER]: asset {0} not found", assetUuid); | 311 | // m_log.ErrorFormat("[UUID GATHERER]: asset {0} not found", assetUuid); |
312 | ErrorCount++; | ||
313 | FailedUUIDs.Add(assetUuid); | 313 | FailedUUIDs.Add(assetUuid); |
314 | return; | 314 | return; |
315 | } | 315 | } |
@@ -318,7 +318,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
318 | 318 | ||
319 | if(assetBase.Data == null || assetBase.Data.Length == 0) | 319 | if(assetBase.Data == null || assetBase.Data.Length == 0) |
320 | { | 320 | { |
321 | m_log.ErrorFormat("[UUID GATHERER]: asset {0}, type {1} has no data", assetUuid, assetType); | 321 | // m_log.ErrorFormat("[UUID GATHERER]: asset {0}, type {1} has no data", assetUuid, assetType); |
322 | ErrorCount++; | ||
322 | FailedUUIDs.Add(assetUuid); | 323 | FailedUUIDs.Add(assetUuid); |
323 | return; | 324 | return; |
324 | } | 325 | } |
@@ -355,6 +356,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
355 | { | 356 | { |
356 | m_log.ErrorFormat("[UUID GATHERER]: Failed to gather uuids for asset with id {0} type {1}: {2}", assetUuid, assetType, e.Message); | 357 | m_log.ErrorFormat("[UUID GATHERER]: Failed to gather uuids for asset with id {0} type {1}: {2}", assetUuid, assetType, e.Message); |
357 | GatheredUuids.Remove(assetUuid); | 358 | GatheredUuids.Remove(assetUuid); |
359 | ErrorCount++; | ||
358 | FailedUUIDs.Add(assetUuid); | 360 | FailedUUIDs.Add(assetUuid); |
359 | } | 361 | } |
360 | } | 362 | } |
@@ -363,7 +365,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
363 | { | 365 | { |
364 | // Here, we want to collect uuids which require further asset fetches but mark the others as gathered | 366 | // Here, we want to collect uuids which require further asset fetches but mark the others as gathered |
365 | if(FailedUUIDs.Contains(assetUuid)) | 367 | if(FailedUUIDs.Contains(assetUuid)) |
368 | { | ||
369 | ErrorCount++; | ||
366 | return; | 370 | return; |
371 | } | ||
367 | if(GatheredUuids.ContainsKey(assetUuid)) | 372 | if(GatheredUuids.ContainsKey(assetUuid)) |
368 | return; | 373 | return; |
369 | try | 374 | try |