aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-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
4 files changed, 26 insertions, 20 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 {