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>
|
/// <returns>Asset base</returns>
|
||||||
override public AssetBase FetchAsset(LLUUID uuid)
|
override public AssetBase FetchAsset(LLUUID uuid)
|
||||||
{
|
{
|
||||||
|
lock(this)
|
||||||
|
{
|
||||||
using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
|
using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid)));
|
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid)));
|
||||||
|
@ -114,6 +115,7 @@ namespace OpenSim.Data.SQLite
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create an asset
|
/// Create an asset
|
||||||
|
@ -128,6 +130,7 @@ namespace OpenSim.Data.SQLite
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
lock(this) {
|
||||||
using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn))
|
using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID)));
|
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID)));
|
||||||
|
@ -142,6 +145,7 @@ namespace OpenSim.Data.SQLite
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Update an asset
|
/// Update an asset
|
||||||
|
@ -151,6 +155,7 @@ namespace OpenSim.Data.SQLite
|
||||||
{
|
{
|
||||||
LogAssetLoad(asset);
|
LogAssetLoad(asset);
|
||||||
|
|
||||||
|
lock(this) {
|
||||||
using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn))
|
using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID)));
|
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID)));
|
||||||
|
@ -163,7 +168,7 @@ namespace OpenSim.Data.SQLite
|
||||||
|
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -190,6 +195,7 @@ namespace OpenSim.Data.SQLite
|
||||||
/// <returns>True if exist, or false.</returns>
|
/// <returns>True if exist, or false.</returns>
|
||||||
override public bool ExistsAsset(LLUUID uuid)
|
override public bool ExistsAsset(LLUUID uuid)
|
||||||
{
|
{
|
||||||
|
lock (this) {
|
||||||
using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
|
using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid)));
|
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid)));
|
||||||
|
@ -208,6 +214,7 @@ namespace OpenSim.Data.SQLite
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete an asset from database
|
/// Delete an asset from database
|
||||||
|
|
Loading…
Reference in New Issue