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


##########
oak-core/src/main/java/org/apache/jackrabbit/oak/core/MutableRoot.java:
##########
@@ -403,7 +412,31 @@ public PermissionProvider getPermissionProvider() {
      * Moves can be applied to {@code MutableTree} instances by calling {@code 
apply()},
      * which will execute all moves in the list on the passed tree instance
      */
-    class Move {
+    interface Move {
+
+        /**
+         * Set this move to the given source and destination. Creates a new 
empty
+         * slot, sets this as the next move and returns it.
+         */
+        Move setMove(String source, MutableTree destParent, String destName);
+
+        /**
+         * Apply this and all subsequent moves to the passed tree instance.
+         */
+        Move apply(MutableTree tree);
+    }
+
+    Move createMove(@Nullable Feature classicMove) {
+        // default implementation is memory reduced move, unless classic
+        // implementation is enabled by system property or feature toggle
+        if (CLASSIC_MOVE || (classicMove != null && classicMove.isEnabled())) {
+            return new ClassicMove();

Review Comment:
   I thought about this for quite a while and then decided it is better to 
enable and use the new implementation by default. It gives us more test 
coverage by running all tests by default with the change. We already know how 
Oak behaves with the classic move implementation. If needed, a user can fall 
back to the current implementation using either the system property or feature 
mechanism.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to