canonical / data-platform-libs

A collection of charm libraries curated by the Data Platform Team
https://charmhub.io/data-platform-libs
Apache License 2.0
9 stars 7 forks source link

Prevent concurrent upgrade_granted event emission #146

Closed paulomach closed 4 months ago

paulomach commented 4 months ago

Issue

Testing rollback in VM charms, it often failed halting the event sequencing. On inspection, it was possible to see concurrent upgrade_granted event being emitted on two units.

Solution

The solution seems to be removing a defer. This is bit hard to pin down, but tests done on the PR#401 of the mysql operator, indicates that the issue went away.