[
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)