diff options
author | UbitUmarov | 2017-06-21 20:15:35 +0100 |
---|---|---|
committer | UbitUmarov | 2017-06-21 20:15:35 +0100 |
commit | 1bfe4da3785ebed17735fdbda7638757bc83269e (patch) | |
tree | ddf072619c61ec7aab0bc680c001ba580e0a738e /OpenSim/Region/CoreModules | |
parent | make oar/iar assets writer be done by caller thread like the rest of the (diff) | |
download | opensim-SC_OLD-1bfe4da3785ebed17735fdbda7638757bc83269e.zip opensim-SC_OLD-1bfe4da3785ebed17735fdbda7638757bc83269e.tar.gz opensim-SC_OLD-1bfe4da3785ebed17735fdbda7638757bc83269e.tar.bz2 opensim-SC_OLD-1bfe4da3785ebed17735fdbda7638757bc83269e.tar.xz |
do not try to store on oars temporary or in transit objects ( they may be deleted during the save)
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs index 5037219..e6ea5d1 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs | |||
@@ -193,22 +193,20 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
193 | if (SaveAssets) | 193 | if (SaveAssets) |
194 | { | 194 | { |
195 | m_log.DebugFormat("[ARCHIVER]: Saving {0} assets", assetUuids.Count); | 195 | m_log.DebugFormat("[ARCHIVER]: Saving {0} assets", assetUuids.Count); |
196 | 196 | ||
197 | // Asynchronously request all the assets required to perform this archive operation | ||
198 | AssetsRequest ar = new AssetsRequest( | 197 | AssetsRequest ar = new AssetsRequest( |
199 | new AssetsArchiver(m_archiveWriter), assetUuids, | 198 | new AssetsArchiver(m_archiveWriter), assetUuids, |
200 | m_rootScene.AssetService, m_rootScene.UserAccountService, | 199 | m_rootScene.AssetService, m_rootScene.UserAccountService, |
201 | m_rootScene.RegionInfo.ScopeID, options, ReceivedAllAssets); | 200 | m_rootScene.RegionInfo.ScopeID, options, null); |
202 | |||
203 | // WorkManager.RunInThread(o => ar.Execute(), null, "Archive Assets Request"); | ||
204 | ar.Execute(); | 201 | ar.Execute(); |
205 | // CloseArchive() will be called from ReceivedAllAssets() | 202 | assetUuids = null; |
206 | } | 203 | } |
207 | else | 204 | else |
208 | { | 205 | { |
209 | m_log.DebugFormat("[ARCHIVER]: Not saving assets since --noassets was specified"); | 206 | m_log.DebugFormat("[ARCHIVER]: Not saving assets since --noassets was specified"); |
210 | CloseArchive(string.Empty); | 207 | // CloseArchive(string.Empty); |
211 | } | 208 | } |
209 | CloseArchive(string.Empty); | ||
212 | } | 210 | } |
213 | catch (Exception e) | 211 | catch (Exception e) |
214 | { | 212 | { |
@@ -236,7 +234,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
236 | { | 234 | { |
237 | SceneObjectGroup sceneObject = (SceneObjectGroup)entity; | 235 | SceneObjectGroup sceneObject = (SceneObjectGroup)entity; |
238 | 236 | ||
239 | if (!sceneObject.IsDeleted && !sceneObject.IsAttachment) | 237 | if (!sceneObject.IsDeleted && !sceneObject.IsAttachment && !sceneObject.IsTemporary && !sceneObject.inTransit) |
240 | { | 238 | { |
241 | if (!CanUserArchiveObject(scene.RegionInfo.EstateSettings.EstateOwner, sceneObject, FilterContent, permissionsModule)) | 239 | if (!CanUserArchiveObject(scene.RegionInfo.EstateSettings.EstateOwner, sceneObject, FilterContent, permissionsModule)) |
242 | { | 240 | { |
@@ -571,7 +569,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
571 | foreach (SceneObjectGroup sceneObject in sceneObjects) | 569 | foreach (SceneObjectGroup sceneObject in sceneObjects) |
572 | { | 570 | { |
573 | //m_log.DebugFormat("[ARCHIVER]: Saving {0} {1}, {2}", entity.Name, entity.UUID, entity.GetType()); | 571 | //m_log.DebugFormat("[ARCHIVER]: Saving {0} {1}, {2}", entity.Name, entity.UUID, entity.GetType()); |
574 | 572 | if(sceneObject.IsDeleted || sceneObject.inTransit) | |
573 | continue; | ||
575 | string serializedObject = serializer.SerializeGroupToXml2(sceneObject, m_options); | 574 | string serializedObject = serializer.SerializeGroupToXml2(sceneObject, m_options); |
576 | string objectPath = string.Format("{0}{1}", regionDir, ArchiveHelpers.CreateObjectPath(sceneObject)); | 575 | string objectPath = string.Format("{0}{1}", regionDir, ArchiveHelpers.CreateObjectPath(sceneObject)); |
577 | m_archiveWriter.WriteFile(objectPath, serializedObject); | 576 | m_archiveWriter.WriteFile(objectPath, serializedObject); |