Open joeyoravec opened 1 month ago
@joeyoravec is this ready to review or are you still working on this?
@joeyoravec is this ready to review or are you still working on this?
I've left this in draft so it's clear that this is not ready for merge. Yes this "works" and is worth reviewing. However I read that COVESA ended all support for https://github.com/COVESA/vsomeip/tree/maintain/3.1 since Apr 2023. If nothing is getting merged to that branch then this backport might only be relevant for users who want to cherry-pick to their own branches.
fixes COVESA/vsomeip#669
As described in issue https://github.com/COVESA/vsomeip/issues/669 the train logic should aggregate Service Discovery, but does not currently. This leads to very low performance on systems offering 1000s of EventGroups.
This PR has similar content to #670 but backported to 3.1.20.3 and containing one additional important fix for that older version. I'm leaving this PR in draft status to gather feedback. The key difference when backporting is:
Ensure departure timer does not go negative
There is a calculation 3.1.20 in
implementation/endpoints/include/buffer.hpp
that results in a negative number in case the timer is already expired:We need to implement a
floor()
so the departure is either in the future, or zero meaning ready to depart, but never negative. Like:In case the value goes negative then other calculations fail. That large negative number is kept and used for the next calculated departure time, breaking that one too.