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

Marcel Reutegger commented on OAK-9149:
---------------------------------------

bq. does the current logic work 100% in exception/retry cases

I'm not 100% sure, but the split operations are put into the current sequence 
on purpose.

- garbage adds operations on the main document only and depends on information 
on the main document. I don't see a problem retrying this when it fails
- intermediate documents must be created before the main document is updated 
because there's a reference from the main to the intermediate document. if 
creating an intermediate document fails, then the main document must not be 
updated.
- split/previous documents (the leafs of the document history) must also be 
created before the main document because there's a reference from the main to 
the split document.
- disconnecting a stale previous document reference usually happens on the main 
document, but sometimes means updating an intermediate document. The update on 
the intermediate document would need to happen first and then the _stalePrev 
entry on the main document can be removed. Retrying should be fine as long as 
the the main document is not updated when the update on the intermediate 
document fails.

To me it also looks like we have to phases.

> Use batch calls in backgroundSplit
> ----------------------------------
>
>                 Key: OAK-9149
>                 URL: https://issues.apache.org/jira/browse/OAK-9149
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: documentmk
>    Affects Versions: 1.32.0
>            Reporter: Stefan Egli
>            Assignee: Stefan Egli
>            Priority: Major
>             Fix For: 1.36.0
>
>
> Currently the splitting of documents is done with individual write 
> operations. This can significantly slow down the background update rate when 
> there are many documents to split. The method 
> DocumentNodeStore.backgroundSplit() should collect operations and perform 
> them in bulk.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to