generated from canonical/template-operator
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean-up relation_changed.emit()
calls
#265
Labels
bug
Something isn't working
Comments
Opened an issue to request these events to be converted to singletons canonical/operator#1205 |
phvalguima
added a commit
that referenced
this issue
May 1, 2024
We should replace calls to `relation_{joined,changed}.emit()` by their end-method's handler. Otherwise we will face situations like #265, where a deferred event constantly gets called up, generates new events which also get deferred and end in a snow ball of deferrals. Closes #265 --------- Co-authored-by: Mehdi Bendriss <bendrissmehdi@gmail.com> Co-authored-by: Carl Csaposs <carl.csaposs@canonical.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I noticed that we are generating an disproportionate amount of
opensearch_peers_relation_changed
events that are getting constantly deferred. That increases significantly the startup time.One example:
We can see that
RelationChangedEvent via OpenSearchOperatorCharm/on/opensearch_peers_relation_changed
gets constantly created and deferred in the process.My recommendation is to replace any known
relation_*
emits for actual calls to their handler functions.The text was updated successfully, but these errors were encountered: