You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by tr...@apache.org on 2008/04/19 07:10:20 UTC
svn commit: r649760 - in
/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle:
AbstractBundlePersistenceManager.java BundleDbPersistenceManager.java
Author: tripod
Date: Fri Apr 18 22:10:19 2008
New Revision: 649760
URL: http://svn.apache.org/viewvc?rev=649760&view=rev
Log:
JCR-1541 Evict fixed NodePropBundle from cache
Modified:
jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java?rev=649760&r1=649759&r2=649760&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java Fri Apr 18 22:10:19 2008
@@ -127,8 +127,8 @@
private long bundleCacheSize = 8 * 1024 * 1024;
/**
- * Returns the size of the bundlecache in megabytes.
- * @return the size of the bundlecache in megabytes.
+ * Returns the size of the bundle cache in megabytes.
+ * @return the size of the bundle cache in megabytes.
*/
public String getBundleCacheSize() {
return String.valueOf(bundleCacheSize / (1024 * 1024));
@@ -408,7 +408,7 @@
bundles = new BundleCache(bundleCacheSize);
missing = new LRUNodeIdCache();
- // init prop defs
+ // init property definitions
if (context.getNodeTypeRegistry() != null) {
idJcrUUID = context.getNodeTypeRegistry()
.getEffectiveNodeType(NameConstants.MIX_REFERENCEABLE)
@@ -655,7 +655,7 @@
}
/**
- * Gets the bundle for the given nodeid.
+ * Gets the bundle for the given node id.
*
* @param id the id of the bundle to retrieve.
* @return the bundle or <code>null</code> if the bundle does not exist
@@ -717,6 +717,15 @@
* {@inheritDoc}
*/
public void checkConsistency(String[] uuids, boolean recursive, boolean fix) {
+ }
+
+ /**
+ * Evicts the bundle with <code>id</code> from the bundle cache.
+ *
+ * @param id the id of the bundle.
+ */
+ protected void evictBundle(NodeId id) {
+ bundles.remove(id);
}
}
Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java?rev=649760&r1=649759&r2=649760&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java Fri Apr 18 22:10:19 2008
@@ -893,6 +893,7 @@
log.info(name + ": Fixing bundle '" + bundle.getId() + "'");
bundle.markOld(); // use UPDATE instead of INSERT
storeBundle(bundle);
+ evictBundle(bundle.getId());
} catch (ItemStateException e) {
log.error(name + ": Error storing fixed bundle: " + e);
}