canonical / mysql-operator

Machine charm for MySQL following the operator framework
https://charmhub.io/mysql
Apache License 2.0
7 stars 10 forks source link

Remove unused key/values from the databag #484

Closed shayancanonical closed 1 month ago

shayancanonical commented 2 months ago

Issue

We refactored how we calculate cluster_initialized and unit_initialized in #482. This uses the metadata in the database instead of relying on units-added-to-cluster and unit-intialized values in the databag. However, there are still places in the code where we set these keys

Solution

Remove statements that set these keys

shayancanonical commented 2 months ago

I had a hunch that it was kept around for some reason, but wasnt sure what. I will test deployment of multi unit clusters to see if it slows down the deployment speed and report back here

shayancanonical commented 2 months ago

Since we are setting member-state and member-role, peer-relation-changed gets triggered anyway and there is no delay in joining the cluster

paulomach commented 2 months ago

Since we are setting member-state and member-role, peer-relation-changed gets triggered anyway and there is no delay in joining the cluster

so kill them with :fire: