[ https://issues.apache.org/jira/browse/UNOMI-867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Sinovassin-Naïk updated UNOMI-867: ------------------------------------------- Summary: Fix reIndex in migration to allow to call the method multiple times (was: reIndex can not be called twice on same index in same migration) > Fix reIndex in migration to allow to call the method multiple times > ------------------------------------------------------------------- > > Key: UNOMI-867 > URL: https://issues.apache.org/jira/browse/UNOMI-867 > Project: Apache Unomi > Issue Type: Bug > Reporter: Jonathan Sinovassin-Naïk > Assignee: Jonathan Sinovassin-Naïk > Priority: Major > Fix For: unomi-2.6.1 > > Time Spent: 40m > Remaining Estimate: 0h > > 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 > {code:java} > 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) > {code} > 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: > {code:java} > 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) > {code} > The script will be executed once -- This message was sent by Atlassian Jira (v8.20.10#820010)