Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
In the migration we are checking if a script has already been executed before executing it.
It allows to rerun the migration if it failed and start when it failed.
But there is an issue with the reIndex step.
If we reIndex the same index in two different scripts, only the first reIndex is taken into account.
because in both cases, the name of the tasks will be
index-prefix_index-name(clone creation) index-prefix_index-name (recreate the index and perform the re-indexation) index-prefix_index-name (delete clone) index-prefix_index-name(refresh at the end)
The names should be unique to allow to execute the reIndex several time during the migration.
There is the issue for the profile reindex
We execute a reIndex in https://github.com/apache/unomi/blob/7130ffa69ddbdd1649d28845e2fe062f1c3a7d07/tools/shell-commands/src/main/resources/META-INF/cxs/migration/migrate-2.0.0-10-profileReindex.groovy#L28
and one in
https://github.com/apache/unomi/blob/a1c4f774bc0be136c3c13921f4a630eb5afd2e5c/tools/shell-commands/src/main/resources/META-INF/cxs/migration/migrate-2.5.0-00-cleanPastEventProfileSession.groovy#L30
As the following lines will be added to the history.json:
index-prefix-profile(clone creation) index-prefix-profile (recreate the index and perform the re-indexation) index-prefix-profile (delete clone) index-prefix-profile (refresh at the end)
The script will be executed once