Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[19665] Hotfix TCP sender resources creation #3932

Merged
merged 6 commits into from
Oct 26, 2023

Conversation

Mario-DL
Copy link
Member

Description

This PR fixes an incorrect behavior when a TCP client receives the discovery information from a TCP server with a WAN configured in the locator. It creates more sender resources than needed as it fails to recognize that the ones already created were matching the target ones.

@Mergifyio backport 2.11.x 2.10.x 2.6.x

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.md file (if applicable).
  • N/A New feature has been documented/Current behavior is correctly described in the documentation.
  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

…Resource to avoid failing the cast

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
@Mario-DL Mario-DL added this to the v2.12.1 milestone Oct 16, 2023
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
@Mario-DL
Copy link
Member Author

@richiprosima please test mac

@Mario-DL Mario-DL changed the title [19655] Hotfix TCP sender resources creation [19665] Hotfix TCP sender resources creation Oct 24, 2023
src/cpp/utils/IPLocator.cpp Outdated Show resolved Hide resolved
src/cpp/rtps/transport/TCPSenderResource.hpp Outdated Show resolved Hide resolved
src/cpp/rtps/transport/UDPSenderResource.hpp Outdated Show resolved Hide resolved
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
@Mario-DL
Copy link
Member Author

@richiprosima please test this

@Mario-DL Mario-DL added the ready-to-merge Ready to be merged. CI and changes have been reviewed and approved. label Oct 26, 2023
@MiguelCompany MiguelCompany merged commit e94deb8 into master Oct 26, 2023
11 of 14 checks passed
@MiguelCompany MiguelCompany deleted the hotfix/tcp_sender_resources branch October 26, 2023 11:16
@Mario-DL
Copy link
Member Author

@Mergifyio backport 2.11.x 2.10.x 2.6.x

@mergify
Copy link
Contributor

mergify bot commented Oct 26, 2023

backport 2.11.x 2.10.x 2.6.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Oct 26, 2023
* Refs #19665: Check if casting from a ChainingSender instead of SenderResource to avoid failing the cast

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: Regression test

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: Check if remote WAN  sender resource already exists

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19655: Linter

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: fix test mac vars init

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: Apply Rev suggestions

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
(cherry picked from commit e94deb8)
mergify bot pushed a commit that referenced this pull request Oct 26, 2023
* Refs #19665: Check if casting from a ChainingSender instead of SenderResource to avoid failing the cast

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: Regression test

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: Check if remote WAN  sender resource already exists

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19655: Linter

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: fix test mac vars init

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: Apply Rev suggestions

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
(cherry picked from commit e94deb8)
mergify bot pushed a commit that referenced this pull request Oct 26, 2023
* Refs #19665: Check if casting from a ChainingSender instead of SenderResource to avoid failing the cast

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: Regression test

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: Check if remote WAN  sender resource already exists

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19655: Linter

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: fix test mac vars init

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: Apply Rev suggestions

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
(cherry picked from commit e94deb8)

# Conflicts:
#	src/cpp/rtps/transport/TCPSenderResource.hpp
#	src/cpp/rtps/transport/shared_mem/SharedMemSenderResource.hpp
EduPonz pushed a commit that referenced this pull request Nov 13, 2023
* Refs #19665: Check if casting from a ChainingSender instead of SenderResource to avoid failing the cast

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: Regression test

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: Check if remote WAN  sender resource already exists

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19655: Linter

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: fix test mac vars init

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: Apply Rev suggestions

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
(cherry picked from commit e94deb8)

Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
EduPonz pushed a commit that referenced this pull request Nov 13, 2023
* Refs #19665: Check if casting from a ChainingSender instead of SenderResource to avoid failing the cast

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: Regression test

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: Check if remote WAN  sender resource already exists

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19655: Linter

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: fix test mac vars init

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: Apply Rev suggestions

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
(cherry picked from commit e94deb8)

Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
EduPonz pushed a commit that referenced this pull request Nov 13, 2023
* Hotfix TCP sender resources creation (#3932)

* Refs #19665: Check if casting from a ChainingSender instead of SenderResource to avoid failing the cast

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: Regression test

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: Check if remote WAN  sender resource already exists

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19655: Linter

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: fix test mac vars init

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19665: Apply Rev suggestions

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
(cherry picked from commit e94deb8)

# Conflicts:
#	src/cpp/rtps/transport/TCPSenderResource.hpp
#	src/cpp/rtps/transport/shared_mem/SharedMemSenderResource.hpp

* Fix conflicts

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
Co-authored-by: Mario Dominguez <mariodominguez@eprosima.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Ready to be merged. CI and changes have been reviewed and approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants