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.0.7.4.1
parent
3a5928f813
commit
1693799623
|
@ -219,12 +219,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
m_log.InfoFormat("[ARCHIVER]: Added control file to archive.");
|
m_log.InfoFormat("[ARCHIVER]: Added control file to archive.");
|
||||||
|
|
||||||
if (SaveAssets)
|
if (SaveAssets)
|
||||||
new AssetsRequest(
|
{
|
||||||
new AssetsArchiver(archiveWriter), assetUuids,
|
AssetsRequest ar
|
||||||
m_scene.AssetService, m_scene.UserAccountService,
|
= new AssetsRequest(
|
||||||
m_scene.RegionInfo.ScopeID, options, awre.ReceivedAllAssets).Execute();
|
new AssetsArchiver(archiveWriter), assetUuids,
|
||||||
|
m_scene.AssetService, m_scene.UserAccountService,
|
||||||
|
m_scene.RegionInfo.ScopeID, options, awre.ReceivedAllAssets);
|
||||||
|
|
||||||
|
Util.FireAndForget(o => ar.Execute());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
awre.ReceivedAllAssets(new List<UUID>(), new List<UUID>());
|
{
|
||||||
|
Util.FireAndForget(o => awre.ReceivedAllAssets(new List<UUID>(), new List<UUID>()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|
|
@ -141,13 +141,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
PerformAssetsRequestCallback(null);
|
PerformAssetsRequestCallback(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (KeyValuePair<UUID, AssetType> kvp in m_uuids)
|
|
||||||
{
|
|
||||||
m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_requestCallbackTimer.Enabled = true;
|
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)
|
protected void OnRequestCallbackTimeout(object source, ElapsedEventArgs args)
|
||||||
|
|
Loading…
Reference in New Issue