From fe33ace3b2514144c34a9dcc71f94722cb11cec9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 24 Nov 2020 22:58:48 +0000 Subject: [PATCH] change sqlitesimulationdata locks a bit --- OpenSim/Data/SQLite/SQLiteSimulationData.cs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index 7163fdd537..c224ef82b8 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs @@ -597,9 +597,8 @@ namespace OpenSim.Data.SQLite // Remove prim row row.Delete(); } + Commit(); } - - Commit(); } /// @@ -947,8 +946,8 @@ namespace OpenSim.Data.SQLite { rowsToDelete[iter].Delete(); } + Commit(); } - Commit(); } /// @@ -1000,9 +999,8 @@ namespace OpenSim.Data.SQLite fillLandAccessRow(newAccessRow, entry, parcel.LandData.GlobalID); landaccesslist.Rows.Add(newAccessRow); } + Commit(); } - - Commit(); } /// @@ -1041,7 +1039,7 @@ namespace OpenSim.Data.SQLite public void Commit() { // m_log.Debug("[SQLITE]: Starting commit"); - lock (ds) + //lock (ds) caller must lock { primDa.Update(ds, "prims"); shapeDa.Update(ds, "primshapes"); @@ -1071,7 +1069,8 @@ namespace OpenSim.Data.SQLite /// public void Shutdown() { - Commit(); + lock(ds) + Commit(); } /*********************************************************************** @@ -2510,9 +2509,8 @@ namespace OpenSim.Data.SQLite fillItemRow(newItemRow, newItem); dbItems.Rows.Add(newItemRow); } + Commit(); } - - Commit(); } /***********************************************************************