Fix race condition in ActionBasedTreeExecutorNode: per-goal TreeConstructor storage via UUID map#19
Merged
robin-mueller merged 2 commits intofeature/event-based-executorfrom Mar 6, 2026
Conversation
…dition Co-authored-by: robin-mueller <83639955+robin-mueller@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] WIP address feedback on Tree executor modularity PR
Fix race condition in ActionBasedTreeExecutorNode: per-goal TreeConstructor storage via UUID map
Mar 6, 2026
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.
pending_tree_constructor_was a single shared member written inhandle_trigger_goal_()and consumed inhandle_trigger_accept_(). Two goals accepted beforestartExecution()marked the executor busy would overwrite each other's constructor, causing the wrong tree to execute.Changes
pending_tree_constructor_→pending_tree_constructors_: replaced the singleTreeConstructorwithstd::map<rclcpp_action::GoalUUID, TreeConstructor>, keyed by goal UUID.handle_trigger_goal_(): stores the constructor into the map under the incoming UUID instead of overwriting a shared member.handle_trigger_accept_(): retrieves and removes the constructor atomically viamap::extract(), eliminating any window where a stale or overwritten entry could be consumed.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.