* Synchronize asset storage operations to mysql as well as reads
* This may help with asset server mysql problems, since both the previous osgrid failures occurred when both a read and write were attempted in the same secondThreadPoolClientBranch
parent
cd658ea845
commit
bde363b572
|
@ -76,6 +76,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
_dbConnection.Connection);
|
||||
MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16);
|
||||
p.Value = assetID.GetBytes();
|
||||
|
||||
try
|
||||
{
|
||||
using (MySqlDataReader dbReader = cmd.ExecuteReader(CommandBehavior.SingleRow))
|
||||
|
@ -107,6 +108,8 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
|
||||
public void CreateAsset(AssetBase asset)
|
||||
{
|
||||
lock (_dbConnection)
|
||||
{
|
||||
MySqlCommand cmd =
|
||||
new MySqlCommand(
|
||||
|
@ -141,6 +144,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
_dbConnection.Reconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateAsset(AssetBase asset)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue