We have upgrade tasks that extend
com.atlassian.sal.api.upgrade.PluginUpgradeTask and commonly use active objects within the upgrade task to load and save values stored in the database. We’re using AO as a key value store and it appears
com.atlassian.activeobjects.external.ActiveObjectsUpgradeTask would not allow us to just update the values for a specific key.
The problem we’re facing with MySQL is that when the upgrade tasks are run and we interact with AO there is a deadlock in the upgrade task because of AO starting up and migrating objects on startup which happens after the PluginEnabledEvent.
We’re using com.atlassian.activeobjects.external.ActiveObjects#executeInTransaction to load and save the data in the upgrade task.
Unfortunately some of our customers are using MySQL and we’ve tested with MySQL version 5.6.39 on Bitbucket Server 5.0.2 which seems to be supported by Atlassian and has this issue I’ve described.
We’d like to know what we should do to mitigate this issue for MySQL?
We’ve tested with other databases like PostGres and all seems ok.