Pick smallest available participant ID for new paricipants (backport #3437)#4555
Merged
Pick smallest available participant ID for new paricipants (backport #3437)#4555
Conversation
* Pick smallest available participant ID for new paricipants Signed-off-by: Shane Loretz <sloretz@google.com> * Fix style issues Signed-off-by: Shane Loretz <sloretz@google.com> * Eliminate m_maxRTPSParticipantId Signed-off-by: Shane Loretz <sloretz@google.com> * Clearer comments on rationale behind return value Signed-off-by: Shane Loretz <sloretz@google.com> * static_cast to avoid warning on WIN32 Signed-off-by: Shane Loretz <sloretz@google.com> * Use special participant id value for prefix creation. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * New reservation mechanism Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> --------- Signed-off-by: Shane Loretz <sloretz@google.com> Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> Co-authored-by: Miguel Company <MiguelCompany@eprosima.com> (cherry picked from commit e46e875) # Conflicts: # src/cpp/rtps/RTPSDomain.cpp # src/cpp/rtps/RTPSDomainImpl.hpp
Contributor
Author
|
Cherry-pick of e46e875 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
10 tasks
Signed-off-by: Jesus Perez <jesusperez@eprosima.com>
Signed-off-by: Jesus Perez <jesusperez@eprosima.com>
Signed-off-by: Jesus Perez <jesusperez@eprosima.com>
Contributor
|
@richiprosima please test this |
Contributor
|
I am reordering windows and mac ci since there are more test failures than usual |
Mario-DL
approved these changes
Apr 4, 2024
Contributor
Mario-DL
left a comment
There was a problem hiding this comment.
Mac OS github ci failed preparing the workspace when re-running the job. Nevertheless, jenkins ci was green and github failed tests on the first attempt are unrelated to this PR. Ready to merge.
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.
Picks the smallest available participant ID.
Description
This picks the smallest available participant ID when creating new participants.
This is necessary for the out of box discovery improvements in ROS 2: ros2/rmw_fastrtps#653
The issue with picking one greater than the maximum participant ID is that it's possible for the ID to increase well beyond the number of alive participants. For example, Participant A is created with 0, and B is created with 1. A is destroyed, and C is created. C takes ID 2 even though 0 is available and there are only two participants. When using unicast discovery this can cause participants to no longer be discoverable after the maximum ID climbs past
maxInititialPeersRange. This is currently causing thetest_launch_rostests to fail with the change to unicast discovery by default.Assuming the change looks ok, would it be possible to backport this to the 2.10 branch (assuming that's the branch that will be used for ROS Iron)?
Contributor Checklist
Commit messages follow the project guidelines.
The code follows the style guidelines of this project.
Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
Any new/modified methods have been properly documented using Doxygen.
Changes are ABI compatible.
Changes are API compatible.
N/A New feature has been added to the
versions.mdfile (if applicable).N/A New feature has been documented/Current behavior is correctly described in the documentation.
N/A Applicable backports have been included in the description.
Reviewer Checklist
This is an automatic backport of pull request #3437 done by [Mergify](https://mergify.com).