Serge Huber created UNOMI-1000:
----------------------------------

             Summary: Background tasks only process the internal "system" tenant
                 Key: UNOMI-1000
                 URL: https://issues.apache.org/jira/browse/UNOMI-1000
             Project: Apache Unomi
          Issue Type: Bug
    Affects Versions: unomi-4.0.0
            Reporter: Serge Huber
             Fix For: unomi-4.0.0


h3. Summary

Unomi runs several tasks in the background. In 4.0, some of them only see the 
data of the internal "system" tenant. They skip every real tenant, including 
"default", where migrated data goes:
* Purge of old profiles, sessions and events. The purge settings have no 
effect, so data keeps growing.
* Daily update of segments and scorings that use relative dates, such as 
"visited in the last 7 days". Profiles never leave these segments.
* Recurring imports and exports. After a restart they are not scheduled again 
until someone saves their configuration.
* Refresh of rule statistics.

Other tasks, such as the rule refresh and tenant usage, already go through 
every tenant.

The goal of this ticket is that these tasks run for every tenant.

h3. Ways to explore
* Run each task once per tenant, with that tenant's context, as the rule 
refresh already does. Restore the previous context after each tenant so nothing 
carries over.
* Do not fix this by letting the system context read all tenants at once. That 
would change how data is kept apart for every caller.
* Recurring imports and exports must run with their own tenant, and keep the 
file location limits added by UNOMI-973.

h3. How to test

In the "default" tenant, check that:
* a profile older than the purge setting is removed,
* a profile leaves a "last 7 days" segment once it is too old,
* a recurring import runs again after a restart.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to