add some locks back into the sqlite asset path, as something changed
that is causing a lot of out of order execution on asset fetches on multi region sims.0.6.0-stable
parent
0ea73384d4
commit
611b56070b
|
@ -94,7 +94,8 @@ namespace OpenSim.Data.SQLite
|
|||
/// <returns>Asset base</returns>
|
||||
override public AssetBase FetchAsset(LLUUID uuid)
|
||||
{
|
||||
|
||||
lock(this)
|
||||
{
|
||||
using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
|
||||
{
|
||||
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid)));
|
||||
|
@ -114,6 +115,7 @@ namespace OpenSim.Data.SQLite
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create an asset
|
||||
|
@ -128,6 +130,7 @@ namespace OpenSim.Data.SQLite
|
|||
}
|
||||
else
|
||||
{
|
||||
lock(this) {
|
||||
using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn))
|
||||
{
|
||||
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID)));
|
||||
|
@ -142,6 +145,7 @@ namespace OpenSim.Data.SQLite
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update an asset
|
||||
|
@ -151,6 +155,7 @@ namespace OpenSim.Data.SQLite
|
|||
{
|
||||
LogAssetLoad(asset);
|
||||
|
||||
lock(this) {
|
||||
using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn))
|
||||
{
|
||||
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID)));
|
||||
|
@ -163,7 +168,7 @@ namespace OpenSim.Data.SQLite
|
|||
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -190,6 +195,7 @@ namespace OpenSim.Data.SQLite
|
|||
/// <returns>True if exist, or false.</returns>
|
||||
override public bool ExistsAsset(LLUUID uuid)
|
||||
{
|
||||
lock (this) {
|
||||
using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
|
||||
{
|
||||
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid)));
|
||||
|
@ -208,6 +214,7 @@ namespace OpenSim.Data.SQLite
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete an asset from database
|
||||
|
|
Loading…
Reference in New Issue