Skip to content

Conversation

@shsms
Copy link
Contributor

@shsms shsms commented Jan 18, 2024

The PowerManager doesn't have a way to identify if an actor that sent a proposal is still active. It needs to know that to know when to drop proposals from a given sender.

With this PR, the resending of proposals by actors also functions as a heart-beat between the actors and the power manager. If an actor hasn't sent a new proposal in 60 seconds, the latest available proposal from that actor is also removed from the power manager.

shsms added 2 commits January 18, 2024 12:59
When the PowerManager receives a `PartialFailure`, in many cases,
resending the request would fix it, because the power distributor
would have new information on how to redistribute differently.

But this doesn't always work, for example in single battery locations
or if all batteries are in an UNCERTAIN state, in which case the power
distributor has to retry with the same batteries.

For this reason, if we don't have a limit on such retries from the
PowerManager, we'd get into an infinite loop that doesn't have any
delay inbetween retries.

Signed-off-by: Sahas Subramanian <[email protected]>
This is used to identify proposals that are too old, so that they can
be removed from consideration when the PowerManager calculates target
power.

Signed-off-by: Sahas Subramanian <[email protected]>
@shsms shsms added this to the v1.0.0-rc4 milestone Jan 18, 2024
@shsms shsms self-assigned this Jan 18, 2024
@shsms shsms requested a review from a team as a code owner January 18, 2024 17:35
@github-actions github-actions bot added part:tests Affects the unit, integration and performance (benchmarks) tests part:data-pipeline Affects the data pipeline part:actor Affects an actor ot the actors utilities (decorator, etc.) labels Jan 18, 2024
@shsms shsms force-pushed the power-manager-improvements branch from 34a5bdc to de2f993 Compare January 18, 2024 17:41
@github-actions github-actions bot added the part:docs Affects the documentation label Jan 18, 2024
@shsms
Copy link
Contributor Author

shsms commented Jan 18, 2024

@daniel-zullo-frequenz I think this needs to be done before we can deploy the power manager.

@daniel-zullo-frequenz daniel-zullo-frequenz added the type:bug Something isn't working label Jan 19, 2024
shsms added 4 commits January 19, 2024 11:05
In the matryoshka algorithm, this method is implemented to delete
proposals that haven't been replaced/updated in the last
`max_proposal_age`.

Signed-off-by: Sahas Subramanian <[email protected]>
Signed-off-by: Sahas Subramanian <[email protected]>
@shsms
Copy link
Contributor Author

shsms commented Jan 19, 2024

Fixed a small bug that would have triggered when using multiple battery pools with different batteries in the same location.

https://github.com/frequenz-floss/frequenz-sdk-python/compare/de2f993594b29364512e9d564b08acf64a64b7ad..ce586b08e614577cb2d9a2e5557c0b3abcb3a609

@shsms shsms added this pull request to the merge queue Jan 19, 2024
Merged via the queue into frequenz-floss:v1.x.x with commit 1595a5f Jan 19, 2024
@shsms shsms deleted the power-manager-improvements branch January 19, 2024 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:actor Affects an actor ot the actors utilities (decorator, etc.) part:data-pipeline Affects the data pipeline part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests type:bug Something isn't working

Projects

Development

Successfully merging this pull request may close these issues.

2 participants