[jira] [Commented] (OAK-4937) JournalGC failing with RDB DocumentStore
[ https://issues.apache.org/jira/browse/OAK-4937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15581368#comment-15581368 ] Julian Reschke commented on OAK-4937: - {{MemoryDocumentStore}} persists the document with a null key. I noticed that the test passes, but that probably means the test is insufficient in some way. > JournalGC failing with RDB DocumentStore > > > Key: OAK-4937 > URL: https://issues.apache.org/jira/browse/OAK-4937 > Project: Jackrabbit Oak > Issue Type: Bug > Components: documentmk, rdbmk >Affects Versions: 1.5.6, 1.4.8 >Reporter: Chetan Mehrotra >Assignee: Julian Reschke > Fix For: 1.4.9, 1.5.13 > > 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)
[jira] [Commented] (OAK-4937) JournalGC failing with RDB DocumentStore
[ https://issues.apache.org/jira/browse/OAK-4937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15581351#comment-15581351 ] Chetan Mehrotra commented on OAK-4937: -- Given that JournalGC was not passing in ID as part of UpdateOp we would need to see what impact it would have had on existing setups on Mongo where this logic worked silently. bq. RDBDocumentStore and MemoryDocumentStore share the same logic and use UpdateUtils.applyChanges [~julian.resc...@gmx.de] Note that test was passing for {{MemoryDocumentStore}}. Also current Journal test run against {{MemoryDocumentStore}} > JournalGC failing with RDB DocumentStore > > > Key: OAK-4937 > URL: https://issues.apache.org/jira/browse/OAK-4937 > Project: Jackrabbit Oak > Issue Type: Bug > Components: documentmk, rdbmk >Affects Versions: 1.5.6, 1.4.8 >Reporter: Chetan Mehrotra >Assignee: Julian Reschke > Fix For: 1.4.9, 1.5.13 > > 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)
[jira] [Commented] (OAK-4937) JournalGC failing with RDB DocumentStore
[ https://issues.apache.org/jira/browse/OAK-4937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15575402#comment-15575402 ] Julian Reschke commented on OAK-4937: - trunk: [r1764898|http://svn.apache.org/r1764898] [r1764814|http://svn.apache.org/r1764814] > JournalGC failing with RDB DocumentStore > > > Key: OAK-4937 > URL: https://issues.apache.org/jira/browse/OAK-4937 > Project: Jackrabbit Oak > Issue Type: Bug > Components: documentmk, rdbmk >Affects Versions: 1.5.6, 1.4.8 >Reporter: Chetan Mehrotra >Assignee: Julian Reschke > Fix For: 1.5.13 > > 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)
[jira] [Commented] (OAK-4937) JournalGC failing with RDB DocumentStore
[ https://issues.apache.org/jira/browse/OAK-4937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15574982#comment-15574982 ] Julian Reschke commented on OAK-4937: - I'll claim that the {{DocumentStore}} implementation works as designed, but the call is wrong. Explanation: {{RDBDocumentStore}} and {{MemoryDocumentStore}} share the same logic and use {{UpdateUtils.applyChanges}}, and that assumes that the ID is part of the update operations. The only difference is that while {{MemoryDocumentStore}} silently "persists" a document with null key, {{RDBDocumentStore}} fails right away. For now let's fix the invocation; I'll also create a ticket to review the contract and possibly enhance the other implementations to fail fast. > JournalGC failing with RDB DocumentStore > > > Key: OAK-4937 > URL: https://issues.apache.org/jira/browse/OAK-4937 > Project: Jackrabbit Oak > Issue Type: Bug > Components: documentmk >Affects Versions: 1.5.6, 1.4.8 >Reporter: Chetan Mehrotra >Assignee: Julian Reschke > 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)
[jira] [Commented] (OAK-4937) JournalGC failing with RDB DocumentStore
[ https://issues.apache.org/jira/browse/OAK-4937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15574937#comment-15574937 ] Julian Reschke commented on OAK-4937: - (we need to check which part of the code makes an incorrect assumption) > 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 >Affects Versions: 1.5.6, 1.4.8 >Reporter: Chetan Mehrotra >Assignee: Julian Reschke > 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)
[jira] [Commented] (OAK-4937) JournalGC failing with RDB DocumentStore
[ 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)