aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2017-06-23 15:50:16 +0100
committerUbitUmarov2017-06-23 15:50:16 +0100
commit3c6790b061fe1dd6d7cf602a3eb082b5bd149012 (patch)
treea046ad46ffb3091a40af7131b21981db09f52ebe /OpenSim/Region
parent actually iar do it for iar (diff)
downloadopensim-SC_OLD-3c6790b061fe1dd6d7cf602a3eb082b5bd149012.zip
opensim-SC_OLD-3c6790b061fe1dd6d7cf602a3eb082b5bd149012.tar.gz
opensim-SC_OLD-3c6790b061fe1dd6d7cf602a3eb082b5bd149012.tar.bz2
opensim-SC_OLD-3c6790b061fe1dd6d7cf602a3eb082b5bd149012.tar.xz
several changes to iar/oar assets error reports
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs10
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs16
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs18
-rw-r--r--OpenSim/Region/Framework/Scenes/UuidGatherer.cs13
5 files changed, 33 insertions, 26 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
index c218f5d..144cbbe 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
@@ -422,15 +422,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
422 { 422 {
423 m_assetGatherer.GatherAll(); 423 m_assetGatherer.GatherAll();
424 424
425 m_log.DebugFormat(
426 "[INVENTORY ARCHIVER]: Saving {0} assets for items", m_assetGatherer.GatheredUuids.Count);
427 int errors = m_assetGatherer.FailedUUIDs.Count; 425 int errors = m_assetGatherer.FailedUUIDs.Count;
426
427 m_log.DebugFormat(
428 "[INVENTORY ARCHIVER]: The items to save reference {0} assets", m_assetGatherer.GatheredUuids.Count + errors);
428 if(errors > 0) 429 if(errors > 0)
429 m_log.DebugFormat("[INVENTORY ARCHIVER]: aditional {0} assets have problems and will be ignored", errors); 430 m_log.DebugFormat("[INVENTORY ARCHIVER]: {0} of this assets have problems and will be ignored", errors);
430 431
431 AssetsRequest ar = new AssetsRequest( 432 AssetsRequest ar = new AssetsRequest(
432 new AssetsArchiver(m_archiveWriter), 433 new AssetsArchiver(m_archiveWriter),
433 m_assetGatherer.GatheredUuids, m_scene.AssetService, 434 m_assetGatherer.GatheredUuids, m_assetGatherer.FailedUUIDs.Count,
435 m_scene.AssetService,
434 m_scene.UserAccountService, m_scene.RegionInfo.ScopeID, 436 m_scene.UserAccountService, m_scene.RegionInfo.ScopeID,
435 options, ReceivedAllAssets); 437 options, ReceivedAllAssets);
436 ar.Execute(); 438 ar.Execute();
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
index 761fece..9500eb6 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
@@ -181,11 +181,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver
181 // Archive the regions 181 // Archive the regions
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 185
185 scenesGroup.ForEachScene(delegate(Scene scene) 186 scenesGroup.ForEachScene(delegate(Scene scene)
186 { 187 {
187 string regionDir = MultiRegionFormat ? scenesGroup.GetRegionDir(scene.RegionInfo.RegionID) : ""; 188 string regionDir = MultiRegionFormat ? scenesGroup.GetRegionDir(scene.RegionInfo.RegionID) : "";
188 ArchiveOneRegion(scene, regionDir, assetUuids); 189 ArchiveOneRegion(scene, regionDir, assetUuids, failedIDs);
189 }); 190 });
190 191
191 // Archive the assets 192 // Archive the assets
@@ -196,6 +197,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
196 197
197 AssetsRequest ar = new AssetsRequest( 198 AssetsRequest ar = new AssetsRequest(
198 new AssetsArchiver(m_archiveWriter), assetUuids, 199 new AssetsArchiver(m_archiveWriter), assetUuids,
200 failedIDs.Count,
199 m_rootScene.AssetService, m_rootScene.UserAccountService, 201 m_rootScene.AssetService, m_rootScene.UserAccountService,
200 m_rootScene.RegionInfo.ScopeID, options, null); 202 m_rootScene.RegionInfo.ScopeID, options, null);
201 ar.Execute(); 203 ar.Execute();
@@ -215,7 +217,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
215 } 217 }
216 } 218 }
217 219
218 private void ArchiveOneRegion(Scene scene, string regionDir, Dictionary<UUID, sbyte> assetUuids) 220 private void ArchiveOneRegion(Scene scene, string regionDir, Dictionary<UUID, sbyte> assetUuids, HashSet<UUID> failedIDs)
219 { 221 {
220 m_log.InfoFormat("[ARCHIVER]: Writing region {0}", scene.Name); 222 m_log.InfoFormat("[ARCHIVER]: Writing region {0}", scene.Name);
221 223
@@ -251,7 +253,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
251 253
252 if (SaveAssets) 254 if (SaveAssets)
253 { 255 {
254 UuidGatherer assetGatherer = new UuidGatherer(scene.AssetService, assetUuids); 256 UuidGatherer assetGatherer = new UuidGatherer(scene.AssetService, assetUuids, failedIDs);
255 int prevAssets = assetUuids.Count; 257 int prevAssets = assetUuids.Count;
256 258
257 foreach (SceneObjectGroup sceneObject in sceneObjects) 259 foreach (SceneObjectGroup sceneObject in sceneObjects)
@@ -259,12 +261,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver
259 261
260 assetGatherer.GatherAll(); 262 assetGatherer.GatherAll();
261 263
262 m_log.DebugFormat(
263 "[ARCHIVER]: {0} scene objects to serialize requiring save of {1} assets",
264 sceneObjects.Count, assetUuids.Count - prevAssets);
265 int errors = assetGatherer.FailedUUIDs.Count; 264 int errors = assetGatherer.FailedUUIDs.Count;
265 m_log.DebugFormat(
266 "[ARCHIVER]: {0} region scene objects to save reference {1} assets",
267 sceneObjects.Count, assetUuids.Count - prevAssets + errors);
266 if(errors > 0) 268 if(errors > 0)
267 m_log.DebugFormat("[ARCHIVER]: aditional {0} assets have problems and will be ignored", errors); 269 m_log.DebugFormat("[ARCHIVER]: {0} of this assets have problems and will be ignored", errors);
268 } 270 }
269 271
270 if (numObjectsSkippedPermissions > 0) 272 if (numObjectsSkippedPermissions > 0)
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs
index efacae3..3092fe0 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
46 /// <value> 46 /// <value>
47 /// Post a message to the log every x assets as a progress bar 47 /// Post a message to the log every x assets as a progress bar
48 /// </value> 48 /// </value>
49 protected static int LOG_ASSET_LOAD_NOTIFICATION_INTERVAL = 50; 49 protected static int LOG_ASSET_LOAD_NOTIFICATION_INTERVAL = 100;
50 50
51 /// <value> 51 /// <value>
52 /// Keep a count of the number of assets written so that we can provide status updates 52 /// Keep a count of the number of assets written so that we can provide status updates
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
index f303498..903cb2d 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
@@ -65,6 +65,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
65 /// uuids to request 65 /// uuids to request
66 /// </value> 66 /// </value>
67 protected IDictionary<UUID, sbyte> m_uuids; 67 protected IDictionary<UUID, sbyte> m_uuids;
68 private int m_previusErrorsCount;
68 69
69 /// <value> 70 /// <value>
70 /// Callback used when all the assets requested have been received. 71 /// Callback used when all the assets requested have been received.
@@ -102,12 +103,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver
102 103
103 protected internal AssetsRequest( 104 protected internal AssetsRequest(
104 AssetsArchiver assetsArchiver, IDictionary<UUID, sbyte> uuids, 105 AssetsArchiver assetsArchiver, IDictionary<UUID, sbyte> uuids,
106 int previusErrorsCount,
105 IAssetService assetService, IUserAccountService userService, 107 IAssetService assetService, IUserAccountService userService,
106 UUID scope, Dictionary<string, object> options, 108 UUID scope, Dictionary<string, object> options,
107 AssetsRequestCallback assetsRequestCallback) 109 AssetsRequestCallback assetsRequestCallback)
108 { 110 {
109 m_assetsArchiver = assetsArchiver; 111 m_assetsArchiver = assetsArchiver;
110 m_uuids = uuids; 112 m_uuids = uuids;
113 m_previusErrorsCount = previusErrorsCount;
111 m_assetsRequestCallback = assetsRequestCallback; 114 m_assetsRequestCallback = assetsRequestCallback;
112 m_assetService = assetService; 115 m_assetService = assetService;
113 m_userAccountService = userService; 116 m_userAccountService = userService;
@@ -119,8 +122,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
119 protected internal void Execute() 122 protected internal void Execute()
120 { 123 {
121 Culture.SetCurrentCulture(); 124 Culture.SetCurrentCulture();
122 m_log.DebugFormat("[ARCHIVER]: AssetsRequest executed looking for {0} possible assets", m_repliesRequired);
123
124 // We can stop here if there are no assets to fetch 125 // We can stop here if there are no assets to fetch
125 if (m_repliesRequired == 0) 126 if (m_repliesRequired == 0)
126 { 127 {
@@ -169,19 +170,20 @@ namespace OpenSim.Region.CoreModules.World.Archiver
169 } 170 }
170 171
171 m_timeOutTimer.Dispose(); 172 m_timeOutTimer.Dispose();
173 int totalerrors = m_notFoundAssetUuids.Count + m_previusErrorsCount;
172 174
173 if(m_timeout) 175 if(m_timeout)
174 m_log.DebugFormat("[ARCHIVER]: Aborted because AssetService request timeout. Successfully added {0} assets", m_foundAssetUuids.Count); 176 m_log.DebugFormat("[ARCHIVER]: Aborted because AssetService request timeout. Successfully added {0} assets", m_foundAssetUuids.Count);
175 else if(m_notFoundAssetUuids.Count == 0) 177 else if(totalerrors == 0)
176 m_log.DebugFormat("[ARCHIVER]: Successfully added all {0} assets", m_foundAssetUuids.Count); 178 m_log.DebugFormat("[ARCHIVER]: Successfully added all {0} assets", m_foundAssetUuids.Count);
177 else 179 else
178 m_log.DebugFormat("[ARCHIVER]: Successfully added {0} assets ({1} assets not found)", 180 m_log.DebugFormat("[ARCHIVER]: Successfully added {0} assets ({1} assets of total request where not found or are damaged",
179 m_foundAssetUuids.Count, m_notFoundAssetUuids.Count); 181 m_foundAssetUuids.Count, totalerrors);
180 182
181 PerformAssetsRequestCallback(m_timeout); 183 PerformAssetsRequestCallback(m_timeout);
182 } 184 }
183 185
184 void OnTimeout(object source, ElapsedEventArgs args) 186 private void OnTimeout(object source, ElapsedEventArgs args)
185 { 187 {
186 m_timeout = true; 188 m_timeout = true;
187 } 189 }
@@ -189,7 +191,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
189 /// <summary> 191 /// <summary>
190 /// Perform the callback on the original requester of the assets 192 /// Perform the callback on the original requester of the assets
191 /// </summary> 193 /// </summary>
192 protected void PerformAssetsRequestCallback(object o) 194 private void PerformAssetsRequestCallback(object o)
193 { 195 {
194 if(m_assetsRequestCallback == null) 196 if(m_assetsRequestCallback == null)
195 return; 197 return;
@@ -208,7 +210,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
208 } 210 }
209 } 211 }
210 212
211 protected AssetBase PostProcess(AssetBase asset) 213 private AssetBase PostProcess(AssetBase asset)
212 { 214 {
213 if (asset.Type == (sbyte)AssetType.Object && asset.Data != null && m_options.ContainsKey("home")) 215 if (asset.Type == (sbyte)AssetType.Object && asset.Data != null && m_options.ContainsKey("home"))
214 { 216 {
diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
index 3a71c12..548aa3a 100644
--- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
+++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
@@ -93,7 +93,8 @@ namespace OpenSim.Region.Framework.Scenes
93 /// <param name="assetService"> 93 /// <param name="assetService">
94 /// Asset service. 94 /// Asset service.
95 /// </param> 95 /// </param>
96 public UuidGatherer(IAssetService assetService) : this(assetService, new Dictionary<UUID, sbyte>()) {} 96 public UuidGatherer(IAssetService assetService) : this(assetService, new Dictionary<UUID, sbyte>(), new HashSet <UUID>()) {}
97 public UuidGatherer(IAssetService assetService, IDictionary<UUID, sbyte> collector) : this(assetService, collector, new HashSet <UUID>()) {}
97 98
98 /// <summary> 99 /// <summary>
99 /// Initializes a new instance of the <see cref="OpenSim.Region.Framework.Scenes.UuidGatherer"/> class. 100 /// Initializes a new instance of the <see cref="OpenSim.Region.Framework.Scenes.UuidGatherer"/> class.
@@ -105,14 +106,14 @@ namespace OpenSim.Region.Framework.Scenes
105 /// Gathered UUIDs will be collected in this dictinaory. 106 /// Gathered UUIDs will be collected in this dictinaory.
106 /// 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.
107 /// </param> 108 /// </param>
108 public UuidGatherer(IAssetService assetService, IDictionary<UUID, sbyte> collector) 109 public UuidGatherer(IAssetService assetService, IDictionary<UUID, sbyte> collector, HashSet <UUID> failedIDs)
109 { 110 {
110 m_assetService = assetService; 111 m_assetService = assetService;
111 GatheredUuids = collector; 112 GatheredUuids = collector;
112 113
113 // FIXME: Not efficient for searching, can improve. 114 // FIXME: Not efficient for searching, can improve.
114 m_assetUuidsToInspect = new Queue<UUID>(); 115 m_assetUuidsToInspect = new Queue<UUID>();
115 FailedUUIDs = new HashSet<UUID>(); 116 FailedUUIDs = failedIDs;
116 } 117 }
117 118
118 /// <summary> 119 /// <summary>
@@ -301,14 +302,14 @@ namespace OpenSim.Region.Framework.Scenes
301 } 302 }
302 catch (Exception e) 303 catch (Exception e)
303 { 304 {
304 m_log.ErrorFormat("[UUID GATHERER]: Failed to get asset with id {0} : {1}", assetUuid, e.Message); 305 m_log.ErrorFormat("[UUID GATHERER]: Failed to get asset {0} : {1}", assetUuid, e.Message);
305 FailedUUIDs.Add(assetUuid); 306 FailedUUIDs.Add(assetUuid);
306 return; 307 return;
307 } 308 }
308 309
309 if(assetBase == null) 310 if(assetBase == null)
310 { 311 {
311 m_log.ErrorFormat("[UUID GATHERER]: asset with id {0} not found", assetUuid); 312 m_log.ErrorFormat("[UUID GATHERER]: asset {0} not found", assetUuid);
312 FailedUUIDs.Add(assetUuid); 313 FailedUUIDs.Add(assetUuid);
313 return; 314 return;
314 } 315 }
@@ -317,7 +318,7 @@ namespace OpenSim.Region.Framework.Scenes
317 318
318 if(assetBase.Data == null || assetBase.Data.Length == 0) 319 if(assetBase.Data == null || assetBase.Data.Length == 0)
319 { 320 {
320 m_log.ErrorFormat("[UUID GATHERER]: asset with id {0} type {1} has no data", assetUuid, assetType); 321 m_log.ErrorFormat("[UUID GATHERER]: asset {0}, type {1} has no data", assetUuid, assetType);
321 FailedUUIDs.Add(assetUuid); 322 FailedUUIDs.Add(assetUuid);
322 return; 323 return;
323 } 324 }