Jonathan Sinovassin-Naïk created UNOMI-893:
----------------------------------------------
Summary: Error on rollover during migration
Key: UNOMI-893
URL: https://issues.apache.org/jira/browse/UNOMI-893
Project: Apache Unomi
Issue Type: Task
Reporter: Jonathan Sinovassin-Naïk
During the migration a rollover can happen during the step
migrate-2.2.0-10-rolloverAndMigrateEventSession.groovy
(https://github.com/apache/unomi/blob/master/tools/shell-commands/src/main/resources/META-INF/cxs/migration/migrate-2.2.0-10-rolloverAndMigrateEventSession.groovy#L62)
if the rollover conditions are met.
If it happen during this step, the rollover policy is not correctly added to
the new index.
It means that the rollover won't be triggered again if the new index match the
rollover condition.
For example with ROLLOVER_MAX_DOCS equals to 100:
During the migration, if the event-000001 reach 100 documents the index will be
rollovered to event-000002 but when event-000002 will reach 100 documents, it
will not be rollovered to event-000003.
The index will be growing indefinitely as the rollover policy will not be
applied correctly to the index.
The issue only happen during the migration. If the rollover happen outside the
migration, the configuration are correctly set to the indices.
A solution to fix the issue is to use index template.
The following branch in draft can be a solution to fix the issue:
https://github.com/apache/unomi/tree/draft-index-template
--
This message was sent by Atlassian Jira
(v8.20.10#820010)