Serge Huber created UNOMI-997:
---------------------------------

             Summary: After migration from 3.0, some data ends up in the wrong 
tenant
                 Key: UNOMI-997
                 URL: https://issues.apache.org/jira/browse/UNOMI-997
             Project: Apache Unomi
          Issue Type: Bug
    Affects Versions: unomi-4.0.0
            Reporter: Serge Huber
             Fix For: unomi-4.0.0


h3. Summary

Unomi 4.0 keeps its built-in definitions (conditions, actions, property types, 
built-in rules) in a shared "system" tenant. The data of each site goes in its 
own tenant. The migration decides where each 3.0 item goes. On real 3.0 data, 
it decides wrongly in three cases:
* Built-in definitions from 3.0 go to the "default" tenant instead of "system". 
A tenant's own copy wins over the system one, so Unomi keeps using the old 3.0 
versions and hides the improved 4.0 ones. For example, a new visit increases 
nbOfVisits but not totalNbOfVisits.
* Place data (geonames) goes to "default", but Unomi reads it from "system". 
Location lookups therefore find nothing after the migration.
* The step that fixes the ids of built-in items misses item types written in 
camelCase, such as conditionType, actionType and propertyType. It still reports 
success.

The goal of this ticket is that, after migration, each item is in the right 
tenant and Unomi uses the 4.0 built-in definitions.

See also UNOMI-996, which stops the migration before it gets this far.

h3. Ways to explore
* Assign to "system" only the definitions that Unomi itself ships and reloads 
at startup. Everything a user created must go to the tenant, even with the 3.0 
scope "systemscope": 3.0 gives this scope to user-created rules, segments and 
scorings by default, and items in "system" are shared by every tenant.
* Make this decision from the item type and the list of shipped definitions, 
not from the name of the temporary index used during the copy.
* Place data (geonames) is shared reference data and belongs in "system".
* Make the id-fixing step match item types exactly, and log how many items it 
changed.

h3. How to test

Migrate a 3.0.1 data set that contains user-created rules, segments, scorings 
and goals. Check that:
* none of them is in the "system" tenant,
* no built-in definition is left in "default",
* a new visit increases totalNbOfVisits,
* a geonames lookup returns results.



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

Reply via email to