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/06/17 16:49:08 UTC
svn commit: r1686032 -
/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/JournalEntry.java
Author: mreutegg
Date: Wed Jun 17 14:49:08 2015
New Revision: 1686032
URL: http://svn.apache.org/r1686032
Log:
OAK-2829: Comparing node states for external changes is too slow
Rename TreeNode.isParentOf() to TreeNode.isAncestorOf()
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=1686032&r1=1686031&r2=1686032&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 Wed Jun 17 14:49:08 2015
@@ -129,7 +129,7 @@ public final class JournalEntry extends
// and have to be added as soon as the 'currentPath' is not
// part of that hierarchy anymore and we 'move elsewhere'.
// eg if 'currentPath' is /a/b/e, then we must flush /a/b/c/d and /a/b/c
- while (node != null && !node.isParentOf(currentNode)) {
+ while (node != null && !node.isAncestorOf(currentNode)) {
// add parent to the diff entry
entry.append(node.getPath(), getChanges(node));
deDuplicatedCnt++;
@@ -399,7 +399,7 @@ public final class JournalEntry extends
return n;
}
- boolean isParentOf(TreeNode other) {
+ boolean isAncestorOf(TreeNode other) {
TreeNode n = other;
while (n.parent != null) {
if (this == n.parent) {