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 mr...@apache.org on 2015/08/12 18:48:27 UTC
svn commit: r1695571 - in /jackrabbit/oak/trunk:
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/
oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/docume...
Author: mreutegg
Date: Wed Aug 12 16:48:27 2015
New Revision: 1695571
URL: http://svn.apache.org/r1695571
Log:
OAK-3223: Remove MongoDiffCache
Removed:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDiffCache.java
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDiffCacheTest.java
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/random/RandomOpCompare.java
Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java?rev=1695571&r1=1695570&r2=1695571&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java Wed Aug 12 16:48:27 2015
@@ -499,11 +499,9 @@ public class DocumentMK {
* Use the given MongoDB as backend storage for the DocumentNodeStore.
*
* @param db the MongoDB connection
- * @param changesSizeMB the size in MB of the capped collection backing
- * the MongoDiffCache.
* @return this
*/
- public Builder setMongoDB(DB db, int changesSizeMB, int blobCacheSizeMB) {
+ public Builder setMongoDB(DB db, int blobCacheSizeMB) {
if (db != null) {
if (this.documentStore == null) {
this.documentStore = new MongoDocumentStore(db, this);
@@ -528,7 +526,7 @@ public class DocumentMK {
* @return this
*/
public Builder setMongoDB(DB db) {
- return setMongoDB(db, 8, 16);
+ return setMongoDB(db, 16);
}
/**
Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java?rev=1695571&r1=1695570&r2=1695571&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java Wed Aug 12 16:48:27 2015
@@ -100,7 +100,6 @@ public class DocumentNodeStoreService {
private static final String DEFAULT_URI = "mongodb://localhost:27017/oak";
private static final int DEFAULT_CACHE = 256;
private static final int DEFAULT_OFF_HEAP_CACHE = 0;
- private static final int DEFAULT_CHANGES_SIZE = 256;
private static final int DEFAULT_BLOB_CACHE_SIZE = 16;
private static final String DEFAULT_DB = "oak";
private static final String DEFAULT_PERSISTENT_CACHE = "";
@@ -184,13 +183,6 @@ public class DocumentNodeStoreService {
private static final String PROP_OFF_HEAP_CACHE = "offHeapCache";
- @Property(intValue = DEFAULT_CHANGES_SIZE,
- label = "Mongo Changes Collection Size (in MB)",
- description = "With the MongoDB backend, the DocumentNodeStore uses a capped collection to cache the diff. " +
- "This value is used to determine the size of that capped collection"
- )
- private static final String PROP_CHANGES_SIZE = "changesSize";
-
@Property(intValue = DEFAULT_BLOB_CACHE_SIZE,
label = "Blob Cache Size (in MB)",
description = "Cache size to store blobs in memory. Used only with default BlobStore " +
@@ -357,7 +349,6 @@ public class DocumentNodeStoreService {
int childrenCachePercentage = toInteger(prop(PROP_CHILDREN_CACHE_PERCENTAGE), DEFAULT_CHILDREN_CACHE_PERCENTAGE);
int docChildrenCachePercentage = toInteger(prop(PROP_DOC_CHILDREN_CACHE_PERCENTAGE), DEFAULT_DOC_CHILDREN_CACHE_PERCENTAGE);
int diffCachePercentage = toInteger(prop(PROP_DIFF_CACHE_PERCENTAGE), DEFAULT_DIFF_CACHE_PERCENTAGE);
- int changesSize = toInteger(prop(PROP_CHANGES_SIZE), DEFAULT_CHANGES_SIZE);
int blobCacheSize = toInteger(prop(PROP_BLOB_CACHE_SIZE), DEFAULT_BLOB_CACHE_SIZE);
String persistentCache = PropertiesUtil.toString(prop(PROP_PERSISTENT_CACHE), DEFAULT_PERSISTENT_CACHE);
int cacheSegmentCount = toInteger(prop(PROP_CACHE_SEGMENT_COUNT), DEFAULT_CACHE_SEGMENT_COUNT);
@@ -407,8 +398,8 @@ public class DocumentNodeStoreService {
// Take care around not logging the uri directly as it
// might contain passwords
log.info("Starting DocumentNodeStore with host={}, db={}, cache size (MB)={}, persistentCache={}, " +
- "'changes' collection size (MB)={}, blobCacheSize (MB)={}, maxReplicationLagInSecs={}",
- mongoURI.getHosts(), db, cacheSize, persistentCache, changesSize, blobCacheSize, maxReplicationLagInSecs);
+ "blobCacheSize (MB)={}, maxReplicationLagInSecs={}",
+ mongoURI.getHosts(), db, cacheSize, persistentCache, blobCacheSize, maxReplicationLagInSecs);
log.info("Mongo Connection details {}", MongoConnection.toString(mongoURI.getOptions()));
}
@@ -416,7 +407,7 @@ public class DocumentNodeStoreService {
DB mongoDB = client.getDB(db);
mkBuilder.setMaxReplicationLag(maxReplicationLagInSecs, TimeUnit.SECONDS);
- mkBuilder.setMongoDB(mongoDB, changesSize, blobCacheSize);
+ mkBuilder.setMongoDB(mongoDB, blobCacheSize);
log.info("Connected to database {}", mongoDB);
}
Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/random/RandomOpCompare.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/random/RandomOpCompare.java?rev=1695571&r1=1695570&r2=1695571&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/random/RandomOpCompare.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/random/RandomOpCompare.java Wed Aug 12 16:48:27 2015
@@ -142,7 +142,7 @@ public class RandomOpCompare {
DB mongoDB = connection.getDB();
return new DocumentMK.Builder().
memoryCacheSize(0).
- setMongoDB(mongoDB, 1, 16).
+ setMongoDB(mongoDB, 16).
setPersistentCache("target/persistentCache,time").
getNodeStore();
}