You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by jk...@apache.org on 2023/05/04 21:50:24 UTC

[unomi] 01/01: UNOMI-764: no scroll queries anymore during merge

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

jkevan pushed a commit to branch avoidScrollDuringMerge2
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit b62af9d35021ffe34f28ee0e4622f227a9477fd3
Author: Kevan <ke...@jahia.com>
AuthorDate: Thu May 4 23:50:09 2023 +0200

    UNOMI-764: no scroll queries anymore during merge
---
 package/src/main/resources/etc/custom.system.properties                | 2 +-
 .../plugins/baseplugin/actions/MergeProfilesOnPropertyAction.java      | 3 ++-
 plugins/baseplugin/src/main/resources/OSGI-INF/blueprint/blueprint.xml | 2 +-
 .../baseplugin/src/main/resources/org.apache.unomi.plugins.base.cfg    | 2 +-
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/package/src/main/resources/etc/custom.system.properties b/package/src/main/resources/etc/custom.system.properties
index 4b321c49b..eb65ab026 100644
--- a/package/src/main/resources/etc/custom.system.properties
+++ b/package/src/main/resources/etc/custom.system.properties
@@ -336,7 +336,7 @@ org.apache.unomi.mail.server.sslOnConnect=${env:UNOMI_MAIL_SSLONCONNECT:-true}
 #######################################################################################################################
 ## baseplugin settings                                                                                                 ##
 #######################################################################################################################
-org.apache.unomi.plugins.base.maxProfilesInOneMerge=${env:UNOMI_MAX_PROFILES_IN_ONE_MERGE:--1}
+org.apache.unomi.plugins.base.maxProfilesInOneMerge=${env:UNOMI_MAX_PROFILES_IN_ONE_MERGE:-50}
 
 #######################################################################################################################
 ## Security settings                                                                                                 ##
diff --git a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/MergeProfilesOnPropertyAction.java b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/MergeProfilesOnPropertyAction.java
index e52c8fd84..14b6f9f52 100644
--- a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/MergeProfilesOnPropertyAction.java
+++ b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/MergeProfilesOnPropertyAction.java
@@ -43,7 +43,8 @@ public class MergeProfilesOnPropertyAction implements ActionExecutor {
     private DefinitionsService definitionsService;
     private PrivacyService privacyService;
     private SchedulerService schedulerService;
-    private int maxProfilesInOneMerge = -1;
+    // TODO we can remove this limit after dealing with: UNOMI-776 (50 is completely arbitrary and it's used to bypass the auto-scroll done by the persistence Service)
+    private int maxProfilesInOneMerge = 50;
 
     public int execute(Action action, Event event) {
 
diff --git a/plugins/baseplugin/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/plugins/baseplugin/src/main/resources/OSGI-INF/blueprint/blueprint.xml
index 15b24ec39..97bbe12d5 100644
--- a/plugins/baseplugin/src/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ b/plugins/baseplugin/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -26,7 +26,7 @@
         <cm:default-properties>
             <cm:property name="useEventToUpdateProfile" value="false"/>
             <cm:property name="usePropertyConditionOptimizations" value="true"/>
-            <cm:property name="maxProfilesInOneMerge" value="-1"/>
+            <cm:property name="maxProfilesInOneMerge" value="50"/>
         </cm:default-properties>
     </cm:property-placeholder>
 
diff --git a/plugins/baseplugin/src/main/resources/org.apache.unomi.plugins.base.cfg b/plugins/baseplugin/src/main/resources/org.apache.unomi.plugins.base.cfg
index 41f80a950..b0bad3b5c 100644
--- a/plugins/baseplugin/src/main/resources/org.apache.unomi.plugins.base.cfg
+++ b/plugins/baseplugin/src/main/resources/org.apache.unomi.plugins.base.cfg
@@ -15,4 +15,4 @@
 # limitations under the License.
 #
 
-maxProfilesInOneMerge=${org.apache.unomi.plugins.base.maxProfilesInOneMerge:--1}
+maxProfilesInOneMerge=${org.apache.unomi.plugins.base.maxProfilesInOneMerge:-50}