[ https://issues.apache.org/jira/browse/OAK-9149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17170693#comment-17170693 ]
Marcel Reutegger commented on OAK-9149: --------------------------------------- In addition to above mentioned changes that are only test related, there is a potential problem using batch calls. {{DocumentStore.createOrUpdate(Collection, List)}} does not guarantee that all changes are applied atomically. Some updates may even fail while others succeed. See JavaDoc on the method. It is also undefined in what sequence the changes are applied and the {{MongoDocumentStore}} implementation in fact performs an unordered bulk update. There is a risk that the main document is first updated, but the split document is not yet there. Similarly, the main document update could succeed while the the split document upsert fails. It is unlikely but may still happen and result in a main document with a dangling reference to a split document. > 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.34.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)