jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From un...@apache.org
Subject svn commit: r1694169 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core: cluster/ClusterNode.java journal/MemoryJournal.java
Date Wed, 05 Aug 2015 10:37:34 GMT
Author: unico
Date: Wed Aug  5 10:37:34 2015
New Revision: 1694169

URL: http://svn.apache.org/r1694169
Log:
JCR-3888 reapply fix: update the local revision within the same update; MemoryJournal now
needs to set the revision of the new record when it is created and not after the update has
already been done

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/MemoryJournal.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java?rev=1694169&r1=1694168&r2=1694169&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
Wed Aug  5 10:37:34 2015
@@ -697,11 +697,12 @@ public class ClusterNode implements Runn
                 return;
             }
             try {
-                long journalUpdateSize = record.update();
 
                 long recordRevision = record.getRevision();
                 setRevision(recordRevision);
 
+                long journalUpdateSize = record.update();
+
                 log.debug("Stored record '{}' to Journal ({})", recordRevision, journalUpdateSize);
 
                 Object updateSizeValue = update.getAttribute(ATTRIBUTE_UPDATE_SIZE);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/MemoryJournal.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/MemoryJournal.java?rev=1694169&r1=1694168&r2=1694169&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/MemoryJournal.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/MemoryJournal.java
Wed Aug  5 10:37:34 2015
@@ -99,6 +99,11 @@ public class MemoryJournal extends Abstr
         checkState();
     }
 
+    @Override
+    protected void appending(AppendRecord record) {
+        record.setRevision(records.size()+1);
+    }
+
     /**
      * {@inheritDoc}
      */
@@ -129,7 +134,6 @@ public class MemoryJournal extends Abstr
             throw new JournalException("Interrupted in append().");
         }
         records.add(new MemoryRecord(getId(), record.getProducerId(), data));
-        record.setRevision(records.size());
     }
 
     /**



Mime
View raw message