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 to...@apache.org on 2017/06/02 10:05:06 UTC
svn commit: r1797365 - in /jackrabbit/oak/trunk/oak-core/src:
main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java
Author: tomekr
Date: Fri Jun 2 10:05:06 2017
New Revision: 1797365
URL: http://svn.apache.org/viewvc?rev=1797365&view=rev
Log:
OAK-6294: The "missing" node cache value breaks the DocumentNodeStore#applyChanges
Reverted the work-around patch until we know the root cause.
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java
Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java?rev=1797365&r1=1797364&r2=1797365&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java Fri Jun 2 10:05:06 2017
@@ -1387,9 +1387,6 @@ public final class DocumentNodeStore
String p = PathUtils.getAncestorPath(path, depth - i);
PathRev key = new PathRev(p, beforeState.getLastRevision());
beforeState = nodeCache.getIfPresent(key);
- if (beforeState == missing) {
- beforeState = null;
- }
}
DocumentNodeState.Children children = null;
if (beforeState != null) {
Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java?rev=1797365&r1=1797364&r2=1797365&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java Fri Jun 2 10:05:06 2017
@@ -3058,21 +3058,6 @@ public class DocumentNodeStoreTest {
}
}
- // OAK-6294
- @Test
- public void missingLastRevInApplyChanges() throws CommitFailedException {
- DocumentNodeStore ns = builderProvider.newBuilder().getNodeStore();
- DocumentNodeState root = ns.getRoot();
-
- RevisionVector before = root.getLastRevision();
- Revision rev = Revision.newRevision(1);
- RevisionVector after = new RevisionVector(Revision.newRevision(1));
-
- ns.getNode("/foo", before);
-
- ns.applyChanges(before, after, rev, "/foo", false, Collections.emptyList(), Collections.emptyList(), Collections.emptyList());
- }
-
private static class WriteCountingStore extends MemoryDocumentStore {
private final ThreadLocal<Boolean> createMulti = new ThreadLocal<>();
int count;