You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by GitBox <gi...@apache.org> on 2022/09/15 09:37:06 UTC

[GitHub] [jackrabbit-oak] mreutegg commented on a diff in pull request #702: OAK-9934: Backport of Oak-9535 "Support recovery of large branch merge" to 1.8

mreutegg commented on code in PR #702:
URL: https://github.com/apache/jackrabbit-oak/pull/702#discussion_r971762034


##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBranch.java:
##########
@@ -130,6 +130,15 @@ public NodeState merge(@NotNull CommitHook hook, @NotNull CommitInfo info)
         return merge0(hook, info, true);
     }
 
+    /**
+     * For test purposes only!
+     * <p>
+     * Forces the branch to persist the changes to the underlying store.
+     */
+    void persist() {
+        branchState.persist();
+    }
+

Review Comment:
   Can you please move this method further down and place it between `getMergeLock()` and `merge0()`? This matches the location in trunk and reduces potential conflicts in the future when further changes a ported back.



##########
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/TestUtils.java:
##########
@@ -93,6 +93,14 @@ public static DocumentNodeState asDocumentState(NodeState state){
         return null;
     }
 
+    public static void persistToBranch(NodeBuilder builder) {
+        if (builder instanceof DocumentRootBuilder) {
+            ((DocumentRootBuilder) builder).persist();
+            return;
+        }
+        fail("Not of type DocumentRootBuilder: " + builder.getClass().getName());
+    }
+

Review Comment:
   Similar as above, can you please move this method between `resetRevisionClockToDefault()` and `disposeQuietly()`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org