* Exprimental prim inventory persistence can now be enabled by users.

* This can be turned on by setting storage_prim_inventories_experimental = True in OpenSim.ini
* Implemented for sqlite and MySQL, no MSSQL implementation yet
* As an experimental feature, there is no guarantee that this won't take down your region or that the db representation won't need to change.
* More (and continuing) details at http://opensimulator.org/wiki/OpenSim:Prim_Inventory_Persistence
ThreadPoolClientBranch
Justin Clarke Casey 2008-01-11 18:44:53 +00:00
parent 48be04df1d
commit 82d7fb7522
5 changed files with 16 additions and 8 deletions

View File

@ -171,6 +171,7 @@ namespace OpenSim
config.Set("serverside_object_permissions", false); config.Set("serverside_object_permissions", false);
config.Set("storage_plugin", "OpenSim.Framework.Data.SQLite.dll"); config.Set("storage_plugin", "OpenSim.Framework.Data.SQLite.dll");
config.Set("storage_connection_string", "URI=file:OpenSim.db,version=3"); config.Set("storage_connection_string", "URI=file:OpenSim.db,version=3");
config.Set("storage_prim_inventories_experimental", false);
config.Set("startup_console_commands_file", ""); config.Set("startup_console_commands_file", "");
config.Set("shutdown_console_commands_file", ""); config.Set("shutdown_console_commands_file", "");
config.Set("script_engine", "OpenSim.Region.ScriptEngine.DotNetEngine.dll"); config.Set("script_engine", "OpenSim.Region.ScriptEngine.DotNetEngine.dll");
@ -242,6 +243,8 @@ namespace OpenSim
m_storageDll = startupConfig.GetString("storage_plugin", "OpenSim.DataStore.MonoSqlite.dll"); m_storageDll = startupConfig.GetString("storage_plugin", "OpenSim.DataStore.MonoSqlite.dll");
m_storageConnectionString m_storageConnectionString
= startupConfig.GetString("storage_connection_string", "URI=file:OpenSim.db,version=3"); = startupConfig.GetString("storage_connection_string", "URI=file:OpenSim.db,version=3");
m_storagePersistPrimInventories
= startupConfig.GetBoolean("storage_prim_inventories_experimental", false);
m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", ""); m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", "");
m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", ""); m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", "");
@ -465,7 +468,7 @@ namespace OpenSim
protected override StorageManager CreateStorageManager(string connectionstring) protected override StorageManager CreateStorageManager(string connectionstring)
{ {
return new StorageManager(m_storageDll, connectionstring); return new StorageManager(m_storageDll, connectionstring, m_storagePersistPrimInventories);
} }
protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager,

View File

@ -58,6 +58,10 @@ namespace OpenSim.Region.ClientStack
protected StorageManager m_storageManager; protected StorageManager m_storageManager;
protected string m_storageConnectionString; protected string m_storageConnectionString;
// An attribute to indicate whether prim inventories should be persisted.
// Probably will be temporary until this stops being experimental.
protected bool m_storagePersistPrimInventories;
public SceneManager SceneManager public SceneManager SceneManager
{ {
get { return m_sceneManager; } get { return m_sceneManager; }

View File

@ -47,7 +47,7 @@ namespace OpenSim.Region.Environment
m_dataStore = storage; m_dataStore = storage;
} }
public StorageManager(string dllName, string connectionstring) public StorageManager(string dllName, string connectionstring, bool persistPrimInventories)
{ {
MainLog.Instance.Verbose("DATASTORE", "Attempting to load " + dllName); MainLog.Instance.Verbose("DATASTORE", "Attempting to load " + dllName);
Assembly pluginAssembly = Assembly.LoadFrom(dllName); Assembly pluginAssembly = Assembly.LoadFrom(dllName);
@ -62,7 +62,7 @@ namespace OpenSim.Region.Environment
{ {
IRegionDataStore plug = IRegionDataStore plug =
(IRegionDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); (IRegionDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
plug.Initialise(connectionstring, false); plug.Initialise(connectionstring, persistPrimInventories);
m_dataStore = plug; m_dataStore = plug;

View File

@ -186,7 +186,7 @@ namespace SimpleApp
protected override StorageManager CreateStorageManager(string connectionstring) protected override StorageManager CreateStorageManager(string connectionstring)
{ {
return new StorageManager("OpenSim.DataStore.NullStorage.dll", "simpleapp.yap"); return new StorageManager("OpenSim.DataStore.NullStorage.dll", "simpleapp.yap", false);
} }
protected override PhysicsScene GetPhysicsScene() protected override PhysicsScene GetPhysicsScene()

View File

@ -54,7 +54,8 @@ namespace OpenSim.Tools.Export
sman = new StorageManager( sman = new StorageManager(
startup.GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"), startup.GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"),
startup.GetString("storage_connection_string", "") startup.GetString("storage_connection_string", ""),
false
); );
} }