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

Julian Reschke edited comment on OAK-8207 at 5/27/19 1:34 PM:
--------------------------------------------------------------

The patches apply cleanly to 1.8, but the test fails. This is because in 1.8 
{{checkpoints = new Checkpoints(this);}} happens before the code change, 
whereas in 1.10 and later, it happens after (over there the code was moved in 
the context of "greedy cluster node"). Moving the line down appears to fix 
things.

 [^OAK-8207-1.8.diff]  - patch for review (cc [~mreutegg])




was (Author: reschke):
The patches apply cleanly to 1.8, but the test fails. This is because in 1.8 
`checkpoints = new Checkpoints(this);` happens before the code change, whereas 
in 1.10 and later, it happens after (over there the code was moved in the 
context of "greedy cluster node"). Moving the line down appears to fix things.

 [^OAK-8207-1.8.diff]  - patch for review (cc [~mreutegg])



> Read-only DocumentNodeStore tries to create root document
> ---------------------------------------------------------
>
>                 Key: OAK-8207
>                 URL: https://issues.apache.org/jira/browse/OAK-8207
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: documentmk
>            Reporter: Marcel Reutegger
>            Assignee: Marcel Reutegger
>            Priority: Minor
>              Labels: candidate_oak_1_8
>             Fix For: 1.10.3, 1.14.0
>
>         Attachments: OAK-8207-1.8.diff
>
>
> When connecting a read-only DocumentNodeStore to a DocumentStore with an 
> empty {{nodes}} collection, the DocumentNodeStore tries to create the root 
> document. The operation then fails with something like:
> {noformat}
> Exception in thread "main" 
> org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: Method - 
> createOrUpdate. Params: [nodes, [key: 0:/ new 
> {_deleted.r16a020ebbbf-0-0=SET_MAP_ENTRY false, 
> _commitRoot.r16a020ebbbf-0-0=SET_MAP_ENTRY 0, _modified=MAX 1554812680}]]
>         at 
> org.apache.jackrabbit.oak.plugins.document.DocumentStoreException.asDocumentStoreException(DocumentStoreException.java:179)
>         at 
> org.apache.jackrabbit.oak.plugins.document.DocumentStoreException.convert(DocumentStoreException.java:131)
>         at 
> org.apache.jackrabbit.oak.plugins.document.DocumentStoreException.convert(DocumentStoreException.java:114)
>         at 
> org.apache.jackrabbit.oak.plugins.document.Commit.applyToDocumentStore(Commit.java:425)
>         at 
> org.apache.jackrabbit.oak.plugins.document.Commit.applyToDocumentStoreWithTiming(Commit.java:280)
>         at 
> org.apache.jackrabbit.oak.plugins.document.Commit.applyToDocumentStore(Commit.java:264)
>         at 
> org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.<init>(DocumentNodeStore.java:624)
>         at 
> org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBuilder.build(DocumentNodeStoreBuilder.java:174)
>         at 
> org.apache.jackrabbit.oak.run.ClusterNodesCommand.execute(ClusterNodesCommand.java:65)
>         at org.apache.jackrabbit.oak.run.Main.main(Main.java:49)
> Caused by: java.lang.UnsupportedOperationException: Method - createOrUpdate. 
> Params: [nodes, [key: 0:/ new {_deleted.r16a020ebbbf-0-0=SET_MAP_ENTRY false, 
> _commitRoot.r16a020ebbbf-0-0=SET_MAP_ENTRY 0, _modified=MAX 1554812680}]]
>         at 
> org.apache.jackrabbit.oak.plugins.document.util.ReadOnlyDocumentStoreWrapperFactory$1.invoke(ReadOnlyDocumentStoreWrapperFactory.java:38)
>         at com.sun.proxy.$Proxy0.createOrUpdate(Unknown Source)
>         at 
> org.apache.jackrabbit.oak.plugins.document.Commit.applyToDocumentStore(Commit.java:365)
>         ... 6 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to