Repository navigation
Conversation
Backport of ros2#2586 to jazzy. The EventsExecutor keys its entity collections by rcl handle address. When an entity is destroyed and a new one is created at the same address, the stale weak entry was kept and the new entity was never registered (on_added was skipped). For timers this means the new timer never fires; for subscriptions the new message callback is never set, so the subscription callback is never invoked. Remove expired entities from the current collection before updating it, as done in rolling. Conflict resolution: jazzy uses current_entities_collection_ (a pointer) and collection_mutex_ instead of current_collection_ and mutex_; the upstream change was adapted to those names. The regression test is cherry-picked unchanged. * Remove expired timers before updating the collection * Add regression test for reinitialized timers bug * Add missing includes * Relocate test under the executors directory * Extend test to run with all supported executors * Adjust comment in fix to make it more generic * Apply ament clang format to test * Fix uncrustify findings Signed-off-by: Alexis Pojomovsky <[email protected]> Co-authored-by: Alexis Pojomovsky <[email protected]> (cherry picked from commit 496c455) Signed-off-by: wufujian <[email protected]>
Author
|
@ahcorde @alsora This is a backport of #2586 to Jazzy, which was never backported. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #2586 to jazzy. The EventsExecutor keys its entity collections by rcl handle address. When an entity is destroyed and a new one is created at the same address, the stale weak entry was kept and the new entity was never registered (on_added was skipped). For timers this means the new timer never fires; for subscriptions the new message callback is never set, so the subscription callback is never invoked.
Remove expired entities from the current collection before updating it, as done in rolling.
Conflict resolution: jazzy uses current_entities_collection_ (a pointer) and collection_mutex_ instead of current_collection_ and mutex_; the upstream change was adapted to those names. The regression test is cherry-picked unchanged.
(cherry picked from commit 496c455)
Description
Fixes # (issue)
Is this user-facing behavior change?
Did you use Generative AI?
Additional Information