* More prim inventory synchronization

* Remove some mysql verbosity
ThreadPoolClientBranch
Justin Clarke Casey 2008-01-16 21:43:22 +00:00
parent 7fa6646d6f
commit e13feaa375
2 changed files with 36 additions and 30 deletions

View File

@ -1222,26 +1222,28 @@ 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);
}
// Eliminate rows from the deletion set which already exist for this prim's inventory
// TODO Very temporary, need to take account of simple metadata changes soon
lock (items)
{
foreach (LLUUID itemId in items.Keys)
{
String rawItemId = itemId.ToString();
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);
}
@ -1250,6 +1252,7 @@ namespace OpenSim.Framework.Data.MySQL
itemsToAdd.Add(items[itemId]);
}
}
}
// Delete excess rows
foreach (DataRow row in dbItemsToRemove.Values)

View File

@ -1283,6 +1283,8 @@ namespace OpenSim.Framework.Data.SQLite
// Eliminate rows from the deletion set which already exist for this prim's inventory
// TODO Very temporary, need to take account of simple metadata changes soon
lock (items)
{
foreach (LLUUID itemId in items.Keys)
{
String rawItemId = itemId.ToString();
@ -1296,6 +1298,7 @@ namespace OpenSim.Framework.Data.SQLite
itemsToAdd.Add(items[itemId]);
}
}
}
// Delete excess rows
foreach (DataRow row in dbItemsToRemove.Values)