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 2016/07/19 06:27:52 UTC

svn commit: r1753336 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/JournalEntry.java

Author: mreutegg
Date: Tue Jul 19 06:27:52 2016
New Revision: 1753336

URL: http://svn.apache.org/viewvc?rev=1753336&view=rev
Log:
OAK-4568: JournalEntry.applyTo() creates complete change tree in memory

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/JournalEntry.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/JournalEntry.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/JournalEntry.java?rev=1753336&r1=1753335&r2=1753336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/JournalEntry.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/JournalEntry.java Tue Jul 19 06:27:52 2016
@@ -135,6 +135,9 @@ public final class JournalEntry extends
                 // add parent to the diff entry
                 entry.append(node.getPath(), getChanges(node));
                 deDuplicatedCnt++;
+                // clean up the hierarchy when we are done with this
+                // part of the tree to avoid excessive memory usage
+                node.children = TreeNode.NO_CHILDREN;
                 node = node.parent;
             }