[24121] Account for notification sample in DataReaderHistory::get_first_untaken_info#6276
Merged
MiguelCompany merged 5 commits into3.4.xfrom Jan 27, 2026
Merged
[24121] Account for notification sample in DataReaderHistory::get_first_untaken_info#6276MiguelCompany merged 5 commits into3.4.xfrom
DataReaderHistory::get_first_untaken_info#6276MiguelCompany merged 5 commits into3.4.xfrom
Conversation
fujitatomoya
approved these changes
Jan 26, 2026
Contributor
fujitatomoya
left a comment
There was a problem hiding this comment.
the fake sample should be taken into account with this PR to avoid an infinite loop in which a WaitSet waiting on the DataReader's StatusCondition never blocks, and eventually causing 100% CPU usage.
@MiguelCompany thanks for the PR 🚀 we also need to backport to kilted, correct?
Member
Author
Contributor
|
oh i missed that backport... thanks! |
emiliocuestaf
requested changes
Jan 26, 2026
emiliocuestaf
approved these changes
Jan 26, 2026
Contributor
emiliocuestaf
left a comment
There was a problem hiding this comment.
LGTM with green CI
…est. Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Moving code to a public static method so it can be used outside. Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
…et_first_untaken_info`. Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
012cfe0 to
0496072
Compare
Contributor
Member
Author
|
@Mergifyio backport master |
Contributor
✅ Backports have been createdDetails
|
mergify bot
pushed a commit
that referenced
this pull request
Jan 27, 2026
…ken_info` (#6276) * Refs #24120. Extend `return_sample_when_writer_disappears` blackbox test. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #24120. Refactor `ReadTakeCommand::generate_info`. Moving code to a public static method so it can be used outside. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #24120. Account for notification sample in `DataReaderHistory::get_first_untaken_info`. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #24121. Please uncrustify. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #24121. Fix build error. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> --------- Signed-off-by: Miguel Company <miguelcompany@eprosima.com> (cherry picked from commit 0096d75)
13 tasks
MiguelCompany
added a commit
that referenced
this pull request
Jan 27, 2026
…ken_info` (#6276) (#6278) * Refs #24120. Extend `return_sample_when_writer_disappears` blackbox test. * Refs #24120. Refactor `ReadTakeCommand::generate_info`. Moving code to a public static method so it can be used outside. * Refs #24120. Account for notification sample in `DataReaderHistory::get_first_untaken_info`. * Refs #24121. Please uncrustify. * Refs #24121. Fix build error. --------- (cherry picked from commit 0096d75) Signed-off-by: Miguel Company <miguelcompany@eprosima.com> Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
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.
Description
When using
get_first_untaken_infoto check whether a DataReader has a sample to be taken, the fake sample introduced in #5943 should be taken into account.Otherwise, as noted in ros2/rclcpp#3036, the application may enter an infinite loop in which a WaitSet waiting in the DataReader's StatusCondition never blocks, and
get_first_untaken_infonever returns OK, causing 100% CPU usage.NOTE: Opening against 3.4.x so the issue in ROS 2 is quickly fixed, so requesting a forward port to master
@Mergifyio backport master
Contributor Checklist
versions.mdfile (if applicable).Reviewer Checklist