-
Notifications
You must be signed in to change notification settings - Fork 15
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
Reduce ClusterDetailsUpdated events #3112
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get the sense that this attribute is sometimes meaningful, even if frequently changing/somewhat "noisy"-ish. Omitting this attribute, sounds to me like losing some possibly meaningful information, even if 80-90% of the time it will be non-informative. Would you say this understanding is accurate ? More concretely, why are frequent changes in this timestamp(-like) attribute not meaningful enough on the whole (i.e. taken together over some longer timescales), and make necessary the changes being proposed in this PR ?
It is indeed meaningful for sap resource agents/pacemaker decisions.
Accurate.
We as trento don't do anything with that attribute and its value, other than possibly showing it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Just a nitpick comment in the usage of Enum.spli_with
and Map.drop
sid | ||
) do | ||
{_, new_attributes} = | ||
Map.split_with(attributes, fn {key, _value} -> key == "lpa_#{String.downcase(sid)}_lpt" end) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we don't want to get the 2 modified versions, maybe simply new_attributes = Map.drop(attributes, ["lpa_#{String.downcase(sid)}_lpt"])
looks more to the point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true! Fixed
16f6359
to
dad5bb8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the explanation!
Description
This PR strips
lpa_<sid>_lpt
cluster node attributes during a cluster discovery, specifically when aRegisterClusterHost
command is dispatched.lpa_<sid>_lpt
is a timestamp attribute attached to a cluster node that possibly changes at every discovery tick, resulting in manyClusterDetailsUpdated
being emitted.We want those possibly frequent changes to that attribute not be issuing the mentioned domain event.
Considerations:
lpa_<sid>_lpt
might be present for every cluster node, and it is being ignored for every cluster nodeSupersedes #3085
How was this tested?
Automated tests.