You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by jo...@apache.org on 2022/10/04 21:51:39 UTC

[jackrabbit-oak] branch fix-pr-662 created (now d59ed1628e)

This is an automated email from the ASF dual-hosted git repository.

joscorbe pushed a change to branch fix-pr-662
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


      at d59ed1628e OAK-9893: Fix queryEngineSettings check.

This branch includes the following new commits:

     new d59ed1628e OAK-9893: Fix queryEngineSettings check.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[jackrabbit-oak] 01/01: OAK-9893: Fix queryEngineSettings check.

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joscorbe pushed a commit to branch fix-pr-662
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit d59ed1628e1029f6fcb8796e4760cd612493649e
Author: José Cordero <co...@adobe.com>
AuthorDate: Tue Oct 4 19:32:52 2022 +0200

    OAK-9893: Fix queryEngineSettings check.
---
 oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java b/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java
index 810aa2fd82..2d3c228e54 100644
--- a/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java
+++ b/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java
@@ -136,6 +136,7 @@ import org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardUtils;
 import org.apache.jackrabbit.oak.spi.descriptors.AggregatingDescriptors;
 import org.apache.jackrabbit.oak.stats.StatisticsProvider;
 import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -577,10 +578,10 @@ public class Oak {
             newSettings.setLimitReads(this.queryEngineSettings.getLimitReads());
             this.queryEngineSettings = new AnnotatedQueryEngineSettings(newSettings);
         }
-        if (queryEngineSettings != null) {
+        if (this.queryEngineSettings != null) {
             Feature prefetchFeature = Feature.newFeature(QueryEngineSettings.FT_NAME_PREFETCH_FOR_QUERIES, whiteboard);
             closer.register(prefetchFeature);
-            queryEngineSettings.setPrefetchFeature(prefetchFeature);
+            this.queryEngineSettings.setPrefetchFeature(prefetchFeature);
         }
 
         return this;
@@ -974,6 +975,10 @@ public class Oak {
             settings.setStrictPathRestriction(strictPathRestriction);
         }
 
+        public void setPrefetchFeature(@Nullable Feature prefetch) {
+            settings.setPrefetchFeature(prefetch);
+        }
+
         @Override
         public void setQueryValidatorPattern(String key, String pattern, String comment, boolean failQuery) {
             settings.getQueryValidator().setPattern(key, pattern, comment, failQuery);