In XAssetService, on a delete asset request also delete the asset in any chained service.
This eliminates the async migration since it causes a race condition with the "delete asset" console commandcpu-performance
parent
f6ce87c96d
commit
dc0455e217
|
@ -199,6 +199,8 @@ namespace OpenSim.Data.MySQL
|
|||
/// <remarks>On failure : Throw an exception and attempt to reconnect to database</remarks>
|
||||
public void StoreAsset(AssetBase asset)
|
||||
{
|
||||
// m_log.DebugFormat("[XASSETS DB]: Storing asset {0} {1}", asset.Name, asset.ID);
|
||||
|
||||
lock (m_dbLock)
|
||||
{
|
||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||
|
|
|
@ -205,15 +205,16 @@ namespace OpenSim.Services.AssetService
|
|||
if (!UUID.TryParse(id, out assetID))
|
||||
return false;
|
||||
|
||||
// Don't bother deleting from a chained asset service. This isn't a big deal since deleting happens
|
||||
// very rarely.
|
||||
if (HasChainedAssetService)
|
||||
m_ChainedAssetService.Delete(id);
|
||||
|
||||
return m_Database.Delete(id);
|
||||
}
|
||||
|
||||
private void MigrateFromChainedService(AssetBase asset)
|
||||
{
|
||||
Util.FireAndForget(o => { Store(asset); m_ChainedAssetService.Delete(asset.ID); });
|
||||
Store(asset);
|
||||
m_ChainedAssetService.Delete(asset.ID);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue