Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'RavenDB-1732' of https://github.com/arekais/ravendb

  • Loading branch information...
commit 0e46bd0a641467eaf211ca7271edd9fd50ecca55 2 parents 3c621e0 + d3223d7
@ayende ayende authored
View
6 Raven.Database/Config/InMemoryRavenConfiguration.cs
@@ -164,6 +164,7 @@ public void Initialize()
TimeToWaitBeforeRunningAbandonedIndexes = ravenSettings.TimeToWaitBeforeRunningAbandonedIndexes.Value;
ResetIndexOnUncleanShutdown = ravenSettings.ResetIndexOnUncleanShutdown.Value;
+ DisableInMemoryIndexing = ravenSettings.DisableInMemoryIndexing.Value;
SetupTransactionMode();
@@ -628,6 +629,11 @@ public bool RunInMemory
}
/// <summary>
+ /// Prevent index from being kept in memory. Default: false
+ /// </summary>
+ public bool DisableInMemoryIndexing { get; set; }
+
+ /// <summary>
/// What sort of transaction mode to use.
/// Allowed values:
/// Lazy - faster, but can result in data loss in the case of server crash.
View
4 Raven.Database/Config/StronglyTypedRavenSettings.cs
@@ -76,6 +76,8 @@ public void Setup(int defaultMaxNumberOfItemsToIndexInSingleBatch, int defaultIn
new BooleanSetting(settings["Raven/CreateAutoIndexesForAdHocQueriesIfNeeded"], true);
ResetIndexOnUncleanShutdown =
new BooleanSetting(settings["Raven/ResetIndexOnUncleanShutdown"], false);
+ DisableInMemoryIndexing =
+ new BooleanSetting(settings["Raven/DisableInMemoryIndexing"], false);
DataDir =
new StringSetting(settings["Raven/DataDir"], @"~\Data");
IndexStoragePath =
@@ -196,6 +198,8 @@ private int GetDefaultMemoryCacheLimitMegabytes()
public BooleanSetting ResetIndexOnUncleanShutdown { get; private set; }
+ public BooleanSetting DisableInMemoryIndexing { get; private set; }
+
public StringSetting DataDir { get; private set; }
public StringSetting IndexStoragePath { get; private set; }
View
3  Raven.Database/Indexing/IndexStorage.cs
@@ -294,7 +294,8 @@ private void LoadExistingSuggestionsExtentions(string indexName, Index indexImpl
if (configuration.RunInMemory ||
(indexDefinition.IsMapReduce == false && // there is no point in creating map/reduce indexes in memory, we write the intermediate results to disk anyway
indexDefinitionStorage.IsNewThisSession(indexDefinition) &&
- indexDefinition.DisableInMemoryIndexing == false))
+ indexDefinition.DisableInMemoryIndexing == false &&
+ configuration.DisableInMemoryIndexing == false))
{
directory = new RAMDirectory();
new IndexWriter(directory, dummyAnalyzer, IndexWriter.MaxFieldLength.UNLIMITED).Dispose(); // creating index structure
Please sign in to comment.
Something went wrong with that request. Please try again.