mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
On OAR saving, try fetch assets serially rather than firing all the requests at the asset service at once.
This may (or may not) improve reliability for http://opensimulator.org/mantis/view.php?id=5898 Quick tests show that save time is the same.
This commit is contained in:
@@ -219,12 +219,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
m_log.InfoFormat("[ARCHIVER]: Added control file to archive.");
|
||||
|
||||
if (SaveAssets)
|
||||
new AssetsRequest(
|
||||
new AssetsArchiver(archiveWriter), assetUuids,
|
||||
m_scene.AssetService, m_scene.UserAccountService,
|
||||
m_scene.RegionInfo.ScopeID, options, awre.ReceivedAllAssets).Execute();
|
||||
{
|
||||
AssetsRequest ar
|
||||
= new AssetsRequest(
|
||||
new AssetsArchiver(archiveWriter), assetUuids,
|
||||
m_scene.AssetService, m_scene.UserAccountService,
|
||||
m_scene.RegionInfo.ScopeID, options, awre.ReceivedAllAssets);
|
||||
|
||||
Util.FireAndForget(o => ar.Execute());
|
||||
}
|
||||
else
|
||||
awre.ReceivedAllAssets(new List<UUID>(), new List<UUID>());
|
||||
{
|
||||
Util.FireAndForget(o => awre.ReceivedAllAssets(new List<UUID>(), new List<UUID>()));
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
@@ -141,13 +141,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
PerformAssetsRequestCallback(null);
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (KeyValuePair<UUID, AssetType> kvp in m_uuids)
|
||||
{
|
||||
m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback);
|
||||
}
|
||||
|
||||
m_requestCallbackTimer.Enabled = true;
|
||||
|
||||
foreach (KeyValuePair<UUID, AssetType> kvp in m_uuids)
|
||||
{
|
||||
// m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback);
|
||||
AssetBase asset = m_assetService.Get(kvp.Key.ToString());
|
||||
PreAssetRequestCallback(kvp.Key.ToString(), kvp.Value, asset);
|
||||
}
|
||||
}
|
||||
|
||||
protected void OnRequestCallbackTimeout(object source, ElapsedEventArgs args)
|
||||
|
||||
Reference in New Issue
Block a user