Reverted MySQLDataStore.cs to not use static mutexes any more, patch didn't work anyway.
Added js to OpenSim.ini.example.ThreadPoolClientBranch
parent
ca5aadfbff
commit
1d95f0521d
|
@ -50,7 +50,6 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
private const string m_landAccessListSelect = "select * from landaccesslist";
|
||||
|
||||
private DataSet m_dataSet;
|
||||
private static object DBAccessLock = new object(); // Trying to use a static object because there might be other regions that keep modifying table
|
||||
private MySqlDataAdapter m_primDataAdapter;
|
||||
private MySqlDataAdapter m_shapeDataAdapter;
|
||||
private MySqlDataAdapter m_itemsDataAdapter;
|
||||
|
@ -104,7 +103,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
|
||||
TestTables(m_connection);
|
||||
|
||||
lock (DBAccessLock)
|
||||
lock (m_dataSet)
|
||||
{
|
||||
m_primTable = createPrimTable();
|
||||
m_dataSet.Tables.Add(m_primTable);
|
||||
|
@ -143,7 +142,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
|
||||
public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID)
|
||||
{
|
||||
lock (DBAccessLock)
|
||||
lock (m_dataSet)
|
||||
{
|
||||
foreach (SceneObjectPart prim in obj.Children.Values)
|
||||
{
|
||||
|
@ -170,7 +169,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
DataTable shapes = m_shapeTable;
|
||||
|
||||
string selectExp = "SceneGroupID = '" + Util.ToRawUuidString(obj) + "'";
|
||||
lock (DBAccessLock)
|
||||
lock (m_dataSet)
|
||||
{
|
||||
DataRow[] primRows = prims.Select(selectExp);
|
||||
foreach (DataRow row in primRows)
|
||||
|
@ -226,7 +225,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
string byRegion = "RegionUUID = '" + Util.ToRawUuidString(regionUUID) + "'";
|
||||
string orderByParent = "ParentID ASC";
|
||||
|
||||
lock (DBAccessLock)
|
||||
lock (m_dataSet)
|
||||
{
|
||||
DataRow[] primsForRegion = prims.Select(byRegion, orderByParent);
|
||||
MainLog.Instance.Verbose("DATASTORE",
|
||||
|
@ -336,7 +335,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
MainLog.Instance.Verbose("DATASTORE", "Storing terrain revision r" + revision.ToString());
|
||||
|
||||
DataTable terrain = m_dataSet.Tables["terrain"];
|
||||
lock (DBAccessLock)
|
||||
lock (m_dataSet)
|
||||
{
|
||||
MySqlCommand cmd = new MySqlCommand("insert into terrain(RegionUUID, Revision, Heightfield)" +
|
||||
" values(?RegionUUID, ?Revision, ?Heightfield)", m_connection);
|
||||
|
@ -397,7 +396,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
|
||||
public void RemoveLandObject(LLUUID globalID)
|
||||
{
|
||||
lock (DBAccessLock)
|
||||
lock (m_dataSet)
|
||||
{
|
||||
using (MySqlCommand cmd = new MySqlCommand("delete from land where UUID=?UUID", m_connection))
|
||||
{
|
||||
|
@ -422,7 +421,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
MainLog.Instance.Verbose("DATASTORE", "Tedds temp fix: Waiting 3 seconds for stuff to catch up. (Someone please fix! :))");
|
||||
System.Threading.Thread.Sleep(2500 + rnd.Next(300, 900));
|
||||
|
||||
lock (DBAccessLock)
|
||||
lock (m_dataSet)
|
||||
{
|
||||
DataTable land = m_landTable;
|
||||
DataTable landaccesslist = m_landAccessListTable;
|
||||
|
@ -454,14 +453,14 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
landaccesslist.Rows.Add(newAccessRow);
|
||||
}
|
||||
|
||||
Commit_NoLock();
|
||||
}
|
||||
Commit();
|
||||
}
|
||||
|
||||
public List<LandData> LoadLandObjects(LLUUID regionUUID)
|
||||
{
|
||||
List<LandData> landDataForRegion = new List<LandData>();
|
||||
lock (DBAccessLock)
|
||||
lock (m_dataSet)
|
||||
{
|
||||
DataTable land = m_landTable;
|
||||
DataTable landaccesslist = m_landAccessListTable;
|
||||
|
@ -523,21 +522,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
m_connection.Open();
|
||||
}
|
||||
|
||||
lock (DBAccessLock)
|
||||
{
|
||||
// Moved code to own sub that can be called directly by "StoreLandObject".
|
||||
// Problem is that:
|
||||
// - StoreLandObject locks
|
||||
// - Some other function waits for lock
|
||||
// - StoreLandObject releases lock
|
||||
// - Other function obtains lock
|
||||
// - StoreLandObject calls Commit that tries to take lock back
|
||||
// - When StoreLandObject's Commit finally gets lock the table has been changed and we crash
|
||||
Commit_NoLock();
|
||||
}
|
||||
}
|
||||
|
||||
private void Commit_NoLock()
|
||||
lock (m_dataSet)
|
||||
{
|
||||
// DisplayDataSet(m_dataSet, "Region DataSet");
|
||||
|
||||
|
@ -555,6 +540,8 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
|
||||
m_dataSet.AcceptChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Shutdown()
|
||||
{
|
||||
|
@ -1231,7 +1218,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
|
||||
// For now, we're just going to crudely remove all the previous inventory items
|
||||
// no matter whether they have changed or not, and replace them with the current set.
|
||||
lock (DBAccessLock)
|
||||
lock (m_dataSet)
|
||||
{
|
||||
RemoveItems(primID);
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
|||
: base(scriptEngine)
|
||||
{
|
||||
base.m_scriptEngine = scriptEngine;
|
||||
|
||||
}
|
||||
private Compiler.LSL.Compiler LSLCompiler;
|
||||
|
||||
|
|
|
@ -225,13 +225,14 @@ AsyncLLCommandLoopms=50
|
|||
WriteScriptSourceToDebugFile=true
|
||||
|
||||
; Specify default script compiler
|
||||
; If you do not specify //cs, //vb or //lsl tag as the first characters of your script then the default compiler will be chosen
|
||||
; Valid languages are: lsl, cs and vb
|
||||
; If you do not specify //cs, //vb, //js or //lsl tag as the first characters of your script then the default compiler will be chosen
|
||||
; Valid languages are: lsl, cs, js and vb
|
||||
DefaultCompileLanguage=lsl
|
||||
|
||||
; Specify what compilers are allowed to be used
|
||||
; Valid languages are: lsl, cs and vb
|
||||
AllowedCompilers=lsl,cs,vb
|
||||
; Note vb only works on Windows for now (Mono lacks VB compile support)
|
||||
; Valid languages are: lsl, cs, js and vb
|
||||
AllowedCompilers=lsl,cs,js,vb
|
||||
|
||||
; Compile scripts with debugging
|
||||
; Probably a thousand times slower, but gives you a line number when something goes wrong.
|
||||
|
|
Loading…
Reference in New Issue