jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1528371 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: kernel/KernelNodeStoreBranch.java plugins/memory/MemoryNodeStore.java
Date Wed, 02 Oct 2013 08:41:38 GMT
Author: mduerig
Date: Wed Oct  2 08:41:38 2013
New Revision: 1528371

URL: http://svn.apache.org/r1528371
Log:
OAK-1055: Occasional test failure in ObservationTest.observation
Temporary work around using explicit synchronisation to ensure Hook.contentChanged sees a
monotone increasing sequence of node states

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java?rev=1528371&r1=1528370&r2=1528371&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
Wed Oct  2 08:41:38 2013
@@ -223,7 +223,6 @@ class KernelNodeStoreBranch extends Abst
 
         @Override
         NodeState merge(CommitHook hook, PostCommitHook committed) throws CommitFailedException
{
-            committed.contentChanged(base, base);
             branchState = new Merged(base);
             return base;
         }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java?rev=1528371&r1=1528370&r2=1528371&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java
Wed Oct  2 08:41:38 2013
@@ -203,9 +203,12 @@ public class MemoryNodeStore implements 
             // TODO: rebase();
             checkNotMerged();
             NodeState merged = ModifiedNodeState.squeeze(checkNotNull(hook).processCommit(base,
root));
-            store.root.set(merged);
-            root = null; // Mark as merged
-            committed.contentChanged(base, merged);
+            synchronized (this) {
+                // FIXME temporarily synchronized to work around the race described in OAK-1055
+                store.root.set(merged);
+                root = null; // Mark as merged
+                committed.contentChanged(base, merged);
+            }
             return merged;
         }
 



Mime
View raw message