2020-11-18 12:40:07 |
John A Meinel |
description |
It seems that if a leader decides to set application data of a peer relation, it then gets a relation-changed event for the peer relation to let it know that there is new app data.
This can lead to a busy wait loop if the leader sets a value, wakes up and sets the value again.
(Which is actually useful on k8s, but as it will also wake up all the other units, it is probably a misfeature.) |
It seems that if a leader decides to set application data of a peer relation, it then gets a relation-changed event for the peer relation to let it know that there is new app data.
This has been determined to only happen if you set genuinely new data (eg, relation-set --app foo=bar, relation-set --app foo=bar will only trigger 1 relation-changed event.)
It still feels suboptimal and charms shouldn't plan on abusing this feature. |
|