[ 
https://issues.apache.org/jira/browse/OAK-4937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15574351#comment-15574351
 ] 

Chetan Mehrotra commented on OAK-4937:
--------------------------------------

Added ignored test at r1764814. The test passes for Memory and Mongo. However 
the issue does not appear to be in RDB logic. Instead the JournalGC logic is 
not setting in ID in UpdateOP. With simple [patch|^OAK-4937-v1.patch] this gets 
fixed

{code}
--- 
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/JournalGarbageCollector.java
+++ 
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/JournalGarbageCollector.java
@@ -164,6 +164,7 @@ public class JournalGarbageCollector {
     private void updateTailTimestamp(long gcOlderThan) {
         UpdateOp op = new UpdateOp(JOURNAL_GC_ID, true);
         op.max(TAIL_TIMESTAMP, gcOlderThan);
+        op.set(Document.ID, JOURNAL_GC_ID);
         ns.getDocumentStore().createOrUpdate(SETTINGS, op);
     }
{code}

So we need to see why this did not caused issue with MemoryDocumentStore or 
MongoDocumentStore. Possibly the implementation should check for id to be 
specified as part of UpdateOp



> JournalGC failing with RDB DocumentStore
> ----------------------------------------
>
>                 Key: OAK-4937
>                 URL: https://issues.apache.org/jira/browse/OAK-4937
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: rdbmk
>            Reporter: Chetan Mehrotra
>             Fix For: 1.6
>
>         Attachments: OAK-4937-v1.patch
>
>
> Journal GC on RDB DocumentStore fails with following exception
> {noformat}
> org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: Can't 
> insert the document: null
>       at 
> org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.internalCreateOrUpdate(RDBDocumentStore.java:1216)
>       at 
> org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.createOrUpdate(RDBDocumentStore.java:295)
>       at 
> org.apache.jackrabbit.oak.plugins.document.util.LeaseCheckDocumentStoreWrapper.createOrUpdate(LeaseCheckDocumentStoreWrapper.java:128)
>       at 
> org.apache.jackrabbit.oak.plugins.document.JournalGarbageCollector.updateTailTimestamp(JournalGarbageCollector.java:167)
>       at 
> org.apache.jackrabbit.oak.plugins.document.JournalGarbageCollector.gc(JournalGarbageCollector.java:112)
>       at 
> org.apache.jackrabbit.oak.plugins.document.JournalGCIT.journalGCSimpleInvocation(JournalGCIT.java:42)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to