Properly lock new separate database accesses
parent
504ae63669
commit
7ca8e28a9a
|
@ -1203,6 +1203,8 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
|
||||
MainLog.Instance.Verbose("DATASTORE", "Entered StorePrimInventory with prim ID {0}", primID);
|
||||
|
||||
lock (m_dataSet)
|
||||
{
|
||||
// Find all existing inventory rows for this prim
|
||||
DataTable dbItems = m_itemsTable;
|
||||
|
||||
|
@ -1215,10 +1217,10 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
|
||||
foreach (DataRow row in dbItemRows)
|
||||
{
|
||||
// MainLog.Instance.Verbose(
|
||||
// "DATASTORE",
|
||||
// "Found item {0}, {1} in prim id {2}",
|
||||
// row["name"], row["itemID"], primID);
|
||||
// MainLog.Instance.Verbose(
|
||||
// "DATASTORE",
|
||||
// "Found item {0}, {1} in prim id {2}",
|
||||
// row["name"], row["itemID"], primID);
|
||||
|
||||
dbItemsToRemove.Add((String)row["itemID"], row);
|
||||
}
|
||||
|
@ -1233,10 +1235,10 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
|
||||
if (dbItemsToRemove.ContainsKey(rawItemId))
|
||||
{
|
||||
// MainLog.Instance.Verbose(
|
||||
// "DATASTORE",
|
||||
// "Discarding item {0}, {1} from remove candidates for prim id {2}",
|
||||
// items[itemId].Name, rawItemId, primID);
|
||||
// MainLog.Instance.Verbose(
|
||||
// "DATASTORE",
|
||||
// "Discarding item {0}, {1} from remove candidates for prim id {2}",
|
||||
// items[itemId].Name, rawItemId, primID);
|
||||
|
||||
dbItemsToRemove.Remove(rawItemId);
|
||||
}
|
||||
|
@ -1271,6 +1273,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
dbItems.Rows.Add(newItemRow);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
|
|
|
@ -1258,6 +1258,8 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
|
||||
MainLog.Instance.Verbose("DATASTORE", "Entered StorePrimInventory with prim ID {0}", primID);
|
||||
|
||||
lock (ds)
|
||||
{
|
||||
// Find all existing inventory rows for this prim
|
||||
DataTable dbItems = ds.Tables["primitems"];
|
||||
|
||||
|
@ -1317,6 +1319,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
dbItems.Rows.Add(newItemRow);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue