DB Update Patch - Duplicate Indices

Hi,

during a Camunda version update I stumbled across some duplicate index creations in the (at least) DB2 update scripts:

patch_7.7.8_to_7.7.9_1

patch_7.8.4_to_7.8.5

Both patches cope with the same JIRA ticket:

https://app.camunda.com/jira/browse/CAM-8833
create index ACT_IDX_HI_PI_PDEFID_END_TIME on ACT_HI_PROCINST(PROC_DEF_ID_, END_TIME_);
create index ACT_IDX_HI_AI_PDEFID_END_TIME on ACT_HI_ACTINST(PROC_DEF_ID_, END_TIME_);

When following the migration guide I would have to apply all the major and minor update scripts which would lead to a problem because I cannot create an index twice.

Am I missing something here? Of course, I can leave out the execution of the second patch script but I am not sure if this kind of error can occurr to me in some other patch scripts too. Which means I would have to compare all patch scripts looking for compatibility to avoid such scenarios. Or I would have to go with a trial-and-error approach and fix every error I encounter on the way to a new Camunda version.

Shouldn’t all the patch scripts for DB migration be suitable for being executed sequentially?

Thanks in advance
Chris

Hi Chris, this is normal. When a patch is released, it is released to all affected versions. So you are right that there may be some duplicate update scripts when performing a large Camunda update across multiple major releases. You can ignore the error as running a “create index” script a second time shouldn’t cause any issues (the index is already there). Alternatively, you could find the duplicates and just only run the first instance of the script if the error worries you. Neither approach should cause issues.

Glad to hear that.

You are right - the duplicate index creation only results in an error.
Currently we are on 7.12 and I am sure there will not be another massive update across multiple versions.

Thanks a lot!
Chris