bhabegger commented on code in PR #3076:
URL: https://github.com/apache/jackrabbit-oak/pull/3076#discussion_r3895554672


##########
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java:
##########
@@ -75,6 +77,24 @@ public class PropertyIndexLookup {
      */
     static final int MAX_COST = 100;
 
+    /**
+     * Feature toggle name for the configurable costPerEntry/costPerExecution
+     * cost formula (OAK-12348).
+     */
+    public static final String FT_OAK_12348 = "FT_OAK-12348";
+
+    /**
+     * When {@code true} (the default), {@link #getCost} reads {@code 
costPerEntry}/
+     * {@code costPerExecution} from the index definition ({@link 
#getCostConfigurable}).
+     * When {@code false}, {@link #getCost} uses the original hardcoded formula
+     * ({@link #getCostLegacy}) unconditionally, ignoring those properties 
even if
+     * set. Enabled by default: the new formula reproduces the legacy one 
exactly
+     * whenever {@code costPerEntry}/{@code costPerExecution} are absent, so 
this is
+     * a behavior-preserving default for anyone not using the new properties 
-- the
+     * toggle exists as an escape hatch, not as an opt-in gate.
+     */

Review Comment:
   Nice catch :) 



-- 
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