jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r708609 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordDeserializer.java
Date Tue, 28 Oct 2008 17:00:42 GMT
Author: jukka
Date: Tue Oct 28 10:00:42 2008
New Revision: 708609

URL: http://svn.apache.org/viewvc?rev=708609&view=rev
Log:
JCR-1813: Invalid journal records during XATransactions

Use a dummy sentinel to ignore empty journal records that may have been erroneously created.

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordDeserializer.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordDeserializer.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordDeserializer.java?rev=708609&r1=708608&r2=708609&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordDeserializer.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordDeserializer.java
Tue Oct 28 10:00:42 2008
@@ -55,9 +55,21 @@
             clusterRecord = new NodeTypeRecord(record);
             clusterRecord.read();
             break;
+        case ClusterRecord.END_MARKER:
+            // JCR-1813: Invalid journal records during XATransactions
+            // Some journal records may be empty due to JCR-1813 and other
+            // issues. We handle such cases with this dummy sentinel record.
+            clusterRecord = new ClusterRecord(record) {
+                protected void doRead() {
+                }
+                protected void doWrite() {
+                }
+                public void process(ClusterRecordProcessor processor) {
+                }
+            };
+            break;
         default:
-            String msg = "Unknown record identifier: " + c;
-            throw new JournalException(msg);
+            throw new JournalException("Unknown record identifier: " + c);
         }
         return clusterRecord;
     }



Mime
View raw message