aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTedd Hansen2008-01-19 21:42:03 +0000
committerTedd Hansen2008-01-19 21:42:03 +0000
commit462fc84eb21b54754b749b2a4f3fa55a55a41680 (patch)
tree3ce3283f1dc8604f8a4dcfca7ca30de16504396a /OpenSim
parentremoved additional debugging, added temp mega-debugging to StoreLandObject (diff)
downloadopensim-SC_OLD-462fc84eb21b54754b749b2a4f3fa55a55a41680.zip
opensim-SC_OLD-462fc84eb21b54754b749b2a4f3fa55a55a41680.tar.gz
opensim-SC_OLD-462fc84eb21b54754b749b2a4f3fa55a55a41680.tar.bz2
opensim-SC_OLD-462fc84eb21b54754b749b2a4f3fa55a55a41680.tar.xz
Removed mega-debugging.
Possibly solved startup crash. Moved MySQL Commit() to inside each functions respective dataset access mutex because if not other threads would be waiting until function released mutex and modify the dataset before the function could commit
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLDataStore.cs33
1 files changed, 7 insertions, 26 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
index 7929c0d..d9a39a3 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
@@ -156,9 +156,9 @@ namespace OpenSim.Framework.Data.MySQL
156 // MainLog.Instance.Verbose("DATASTORE", "Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID); 156 // MainLog.Instance.Verbose("DATASTORE", "Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID);
157 } 157 }
158 } 158 }
159 }
160 159
161 Commit(); 160 Commit();
161 }
162 } 162 }
163 163
164 public void RemoveObject(LLUUID obj, LLUUID regionUUID) 164 public void RemoveObject(LLUUID obj, LLUUID regionUUID)
@@ -198,9 +198,9 @@ namespace OpenSim.Framework.Data.MySQL
198 // Remove prim row 198 // Remove prim row
199 row.Delete(); 199 row.Delete();
200 } 200 }
201 }
202 201
203 Commit(); 202 Commit();
203 }
204 } 204 }
205 205
206 /// <summary> 206 /// <summary>
@@ -418,57 +418,38 @@ namespace OpenSim.Framework.Data.MySQL
418 { 418 {
419 lock (m_dataSet) 419 lock (m_dataSet)
420 { 420 {
421 MainLog.Instance.Verbose("DATASTORE", "Tedd debug: 1");
422 DataTable land = m_landTable; 421 DataTable land = m_landTable;
423 MainLog.Instance.Verbose("DATASTORE", "Tedd debug: 2");
424 DataTable landaccesslist = m_landAccessListTable; 422 DataTable landaccesslist = m_landAccessListTable;
425 423
426 MainLog.Instance.Verbose("DATASTORE", "Tedd debug: 3");
427 DataRow landRow = land.Rows.Find(Util.ToRawUuidString(parcel.landData.globalID)); 424 DataRow landRow = land.Rows.Find(Util.ToRawUuidString(parcel.landData.globalID));
428 MainLog.Instance.Verbose("DATASTORE", "Tedd debug: 4");
429 if (landRow == null) 425 if (landRow == null)
430 { 426 {
431 MainLog.Instance.Verbose("DATASTORE", "Tedd debug: 5");
432 landRow = land.NewRow(); 427 landRow = land.NewRow();
433 MainLog.Instance.Verbose("DATASTORE", "Tedd debug: 6");
434 fillLandRow(landRow, parcel.landData, regionUUID); 428 fillLandRow(landRow, parcel.landData, regionUUID);
435 MainLog.Instance.Verbose("DATASTORE", "Tedd debug: 7");
436 land.Rows.Add(landRow); 429 land.Rows.Add(landRow);
437 } 430 }
438 else 431 else
439 { 432 {
440 MainLog.Instance.Verbose("DATASTORE", "Tedd debug: 8");
441 fillLandRow(landRow, parcel.landData, regionUUID); 433 fillLandRow(landRow, parcel.landData, regionUUID);
442 } 434 }
443 435
444 MainLog.Instance.Verbose("DATASTORE", "Tedd debug: 9");
445 using ( 436 using (
446 MySqlCommand cmd = 437 MySqlCommand cmd =
447 new MySqlCommand("delete from landaccesslist where LandUUID=?LandUUID", m_connection)) 438 new MySqlCommand("delete from landaccesslist where LandUUID=?LandUUID", m_connection))
448 { 439 {
449 MainLog.Instance.Verbose("DATASTORE", "Tedd debug: 10");
450 cmd.Parameters.Add(new MySqlParameter("?LandUUID", Util.ToRawUuidString(parcel.landData.globalID))); 440 cmd.Parameters.Add(new MySqlParameter("?LandUUID", Util.ToRawUuidString(parcel.landData.globalID)));
451 MainLog.Instance.Verbose("DATASTORE", "Tedd debug: 11");
452 cmd.ExecuteNonQuery(); 441 cmd.ExecuteNonQuery();
453 } 442 }
454 443
455 MainLog.Instance.Verbose("DATASTORE", "Tedd debug: 12");
456 int i = 0;
457 foreach (ParcelManager.ParcelAccessEntry entry in parcel.landData.parcelAccessList) 444 foreach (ParcelManager.ParcelAccessEntry entry in parcel.landData.parcelAccessList)
458 { 445 {
459 i++;
460 MainLog.Instance.Verbose("DATASTORE", "Tedd debug: 12:1:" + i);
461 DataRow newAccessRow = landaccesslist.NewRow(); 446 DataRow newAccessRow = landaccesslist.NewRow();
462 MainLog.Instance.Verbose("DATASTORE", "Tedd debug: 12:2:" + i);
463 fillLandAccessRow(newAccessRow, entry, parcel.landData.globalID); 447 fillLandAccessRow(newAccessRow, entry, parcel.landData.globalID);
464 MainLog.Instance.Verbose("DATASTORE", "Tedd debug: 12:3:" + i);
465 landaccesslist.Rows.Add(newAccessRow); 448 landaccesslist.Rows.Add(newAccessRow);
466 } 449 }
467 }
468 450
469 MainLog.Instance.Verbose("DATASTORE", "Tedd debug: 13");
470 Commit(); 451 Commit();
471 MainLog.Instance.Verbose("DATASTORE", "Tedd debug: 14"); 452 }
472 } 453 }
473 454
474 public List<LandData> LoadLandObjects(LLUUID regionUUID) 455 public List<LandData> LoadLandObjects(LLUUID regionUUID)
@@ -536,8 +517,6 @@ namespace OpenSim.Framework.Data.MySQL
536 m_connection.Open(); 517 m_connection.Open();
537 } 518 }
538 519
539 lock (m_dataSet)
540 {
541 // DisplayDataSet(m_dataSet, "Region DataSet"); 520 // DisplayDataSet(m_dataSet, "Region DataSet");
542 521
543 m_primDataAdapter.Update(m_primTable); 522 m_primDataAdapter.Update(m_primTable);
@@ -553,12 +532,14 @@ namespace OpenSim.Framework.Data.MySQL
553 m_landAccessListDataAdapter.Update(m_landAccessListTable); 532 m_landAccessListDataAdapter.Update(m_landAccessListTable);
554 533
555 m_dataSet.AcceptChanges(); 534 m_dataSet.AcceptChanges();
556 }
557 } 535 }
558 536
559 public void Shutdown() 537 public void Shutdown()
560 { 538 {
561 Commit(); 539 lock (m_dataSet)
540 {
541 Commit();
542 }
562 } 543 }
563 544
564 /*********************************************************************** 545 /***********************************************************************