Skip to content

Fix that every actor instance receives every update for their type #135

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

Merged
merged 3 commits into from
Apr 15, 2025

Conversation

Marenz
Copy link
Contributor

@Marenz Marenz commented Apr 14, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings April 14, 2025 09:24
@Marenz Marenz requested a review from a team as a code owner April 14, 2025 09:24
@github-actions github-actions bot added part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests part:dispatcher Affects the high-level dispatcher interface labels Apr 14, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

tests/test_mananging_actor.py:1

  • [nitpick] The filename 'test_mananging_actor.py' appears to contain a spelling error; consider renaming it to 'test_managing_actor.py' for clarity.
test_mananging_actor.py

Signed-off-by: Mathias L. Baumann <[email protected]>
@llucax
Copy link
Contributor

llucax commented Apr 14, 2025

Can you maybe add a more descriptive body to the PR or the commit (or both) and the release notes? From the title I don't understand what happened and how you intend to fix it.

Copy link
Contributor

@llucax llucax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, from the code I guess what happened before is that every managed actor would receive all updates to all other managed actors, so if a dispatch handled by managed actor 1 was updated, managed actor 2 would receive that update even if it wasn't its type, or if the merge result was intended to some other actor even if it was from its managed type, right?

If so, I think the release notes should be improved to make it more clear, and to also mention this affects merged dispatches using other strategies too, right? In the extreme case of not merging at all, it even means actor handing dispatch with ID 1 was receiving updates for dispatch with ID 2, 3, etc. and now will only receive updates for dispatch with ID 1?

I think the docs should be improved too to mention how this works explicitly (probably in the method creating the new updates receiver, and in the high-level docs for Dispatcher.start_managing() too), otherwise actor implementors will still implement the logic to handle dispatch updates that are not intended for them.

@Marenz
Copy link
Contributor Author

Marenz commented Apr 14, 2025

what happened before is that every managed actor would receive all updates to all other managed actors, so if a dispatch handled by managed actor 1 was updated, managed actor 2 would receive that update even if it wasn't its type,

No no, nothing that severe. Only actors of the same type would receive all updates of the matching thus same type. This matters only for one single use case:

When you have multiple instances per type. And so far that's only the power setting actor. And sahas is very aware as he told me about this ;)

@llucax
Copy link
Contributor

llucax commented Apr 14, 2025

OK, still the release notes have to be clear, and my complete misunderstanding of the issue is a good proof of that 😄

Otherwise people might make the wrong assumption and think they need to do changes or whatever.

Signed-off-by: Mathias L. Baumann <[email protected]>
@Marenz Marenz requested a review from llucax April 14, 2025 14:09
@Marenz Marenz enabled auto-merge April 14, 2025 16:00
@Marenz Marenz added this pull request to the merge queue Apr 15, 2025
Merged via the queue into frequenz-floss:v0.x.x with commit 81d115f Apr 15, 2025
5 checks passed
@Marenz Marenz deleted the componts branch April 15, 2025 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:dispatcher Affects the high-level dispatcher interface part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants