You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by ch...@apache.org on 2014/08/12 08:22:19 UTC

svn commit: r1617418 - in /jackrabbit/oak/trunk: oak-doc/src/site/markdown/osgi_config.md oak-pojosr/src/test/groovy/org/apache/jackrabbit/oak/run/osgi/DocumentNodeStoreConfigTest.groovy

Author: chetanm
Date: Tue Aug 12 06:22:19 2014
New Revision: 1617418

URL: http://svn.apache.org/r1617418
Log:
OAK-2025 - Make the cache size in MongoBlobStore configurable

- Adding testcase for new config
- Updating the docs

Modified:
    jackrabbit/oak/trunk/oak-doc/src/site/markdown/osgi_config.md
    jackrabbit/oak/trunk/oak-pojosr/src/test/groovy/org/apache/jackrabbit/oak/run/osgi/DocumentNodeStoreConfigTest.groovy

Modified: jackrabbit/oak/trunk/oak-doc/src/site/markdown/osgi_config.md
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/markdown/osgi_config.md?rev=1617418&r1=1617417&r2=1617418&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-doc/src/site/markdown/osgi_config.md (original)
+++ jackrabbit/oak/trunk/oak-doc/src/site/markdown/osgi_config.md Tue Aug 12 06:22:19 2014
@@ -94,6 +94,12 @@ versionGcMaxAgeInSecs
   content would only be marked deleted at revision for T1 but its content would not be removed. Only when a Revision
   GC is run then its content would removed and that too only after (currentTime -T1 > versionGcMaxAgeInSecs)
 
+blobCacheSize
+: Default 16 (MB)
+: DocumentNodeStore when running with Mongo would use `MongoBlobStore` by default unless a custom `BlobStore` is 
+  configured. In such scenario the size of in memory cache for the frequently used blobs can be configured via 
+  `blobCacheSize`. 
+
 Example config file
 
     mongouri=mongodb://localhost:27017

Modified: jackrabbit/oak/trunk/oak-pojosr/src/test/groovy/org/apache/jackrabbit/oak/run/osgi/DocumentNodeStoreConfigTest.groovy
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-pojosr/src/test/groovy/org/apache/jackrabbit/oak/run/osgi/DocumentNodeStoreConfigTest.groovy?rev=1617418&r1=1617417&r2=1617418&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-pojosr/src/test/groovy/org/apache/jackrabbit/oak/run/osgi/DocumentNodeStoreConfigTest.groovy (original)
+++ jackrabbit/oak/trunk/oak-pojosr/src/test/groovy/org/apache/jackrabbit/oak/run/osgi/DocumentNodeStoreConfigTest.groovy Tue Aug 12 06:22:19 2014
@@ -21,6 +21,7 @@ package org.apache.jackrabbit.oak.run.os
 
 import de.kalpatec.pojosr.framework.launch.PojoServiceRegistry
 import org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore
+import org.apache.jackrabbit.oak.plugins.document.mongo.MongoBlobStore
 import org.apache.jackrabbit.oak.plugins.document.util.MongoConnection
 import org.apache.jackrabbit.oak.spi.blob.BlobStore
 import org.apache.jackrabbit.oak.spi.blob.MemoryBlobStore
@@ -154,7 +155,8 @@ class DocumentNodeStoreConfigTest extend
         createConfig([
                 'org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService': [
                         mongouri: MongoUtils.mongoURI,
-                        db      : MongoUtils.mongoDB
+                        db      : MongoUtils.mongoDB,
+                        blobCacheSize      : 1024,
                 ]
         ])
 
@@ -162,6 +164,8 @@ class DocumentNodeStoreConfigTest extend
 
         Collection<String> colNames = getCollectionNames()
         assert colNames.containsAll(['NODES', "BLOBS"])
+
+        assert 1024*1024*1024 == ((MongoBlobStore)ns.blobStore).blobCacheSize
     }
 
     @Override