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)
|
||||||
{
|
{
|
||||||
|
|
|
@ -142,12 +142,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_requestCallbackTimer.Enabled = true;
|
||||||
|
|
||||||
foreach (KeyValuePair<UUID, AssetType> kvp in m_uuids)
|
foreach (KeyValuePair<UUID, AssetType> kvp in m_uuids)
|
||||||
{
|
{
|
||||||
m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback);
|
// m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback);
|
||||||
|
AssetBase asset = m_assetService.Get(kvp.Key.ToString());
|
||||||
|
PreAssetRequestCallback(kvp.Key.ToString(), kvp.Value, asset);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_requestCallbackTimer.Enabled = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void OnRequestCallbackTimeout(object source, ElapsedEventArgs args)
|
protected void OnRequestCallbackTimeout(object source, ElapsedEventArgs args)
|
||||||
|
|
Loading…
Reference in New Issue