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

[22519] Decouple transport receivers creation using unique network flows (backport #5583) #5591

Open
wants to merge 3 commits into
base: 2.10.x
Choose a base branch
from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jan 22, 2025

Description

This is a follow-up of #5461, attempting to solve ros2/ros2#1617.

In that concrete scenario (where builtin + TCP transports are used in clients), the problem is that while the TCP (and UDP) transports are rightly able to create a receiver in the dedicated "unique flow" port, shared memory fails for that same port as the other process is already listening on it. However this was not being handled properly, so once matched, the publisher attempts to send data to the wrongfully announced shared memory locator.

Note that the underlying problem is that, when creating unique network flows, all transports are requested to create a receiver for a specific port all together. This is, the creation of unique flow receivers is only considered to fail when it fails for all transports, instead of decoupling them and keep trying for alternative ports when the creation of a specific transport receiver fails. The present PR fixes this behavior.

@Mergifyio backport 3.1.x 3.0.x 2.14.x 2.10.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

  • N/A Any new/modified methods have been properly documented using Doxygen.

  • N/A Any new configuration API has an equivalent XML API (with the corresponding XSD extension)

  • Changes are backport compatible: they do NOT break ABI nor change library core behavior.

  • 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.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • N/A If this is a critical bug fix, backports to the critical-only supported branches have been requested.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

This is an automatic backport of pull request #5583 done by [Mergify](https://mergify.com).

* Refs #22055: Add regression tests

Signed-off-by: cferreiragonz <[email protected]>

* Refs #22055: Fix unique flows for TCP

Signed-off-by: cferreiragonz <[email protected]>

* Refs #22055: Fix tests

Signed-off-by: cferreiragonz <[email protected]>

---------

Signed-off-by: cferreiragonz <[email protected]>
(cherry picked from commit 81cdb10)

# Conflicts:
#	test/blackbox/common/BlackboxTestsTransportTCP.cpp
@mergify mergify bot added the conflicts Backport PR wich git cherry pick failed label Jan 22, 2025
Copy link
Contributor Author

mergify bot commented Jan 22, 2025

Cherry-pick of e6e918f has failed:

On branch mergify/bp/2.10.x/pr-5583
Your branch is up to date with 'origin/2.10.x'.

You are currently cherry-picking commit e6e918fe.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   src/cpp/rtps/participant/RTPSParticipantImpl.h

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   src/cpp/rtps/participant/RTPSParticipantImpl.cpp
	both modified:   test/blackbox/common/BlackboxTestsNetworkConf.cpp

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

@cferreiragonz
Copy link
Contributor

cferreiragonz commented Jan 22, 2025

@cferreiragonz cferreiragonz force-pushed the mergify/bp/2.10.x/pr-5583 branch from 4e6b5dd to 78bf8c4 Compare January 22, 2025 09:03
@cferreiragonz cferreiragonz added needs rebase ci-pending PR which CI is running and removed conflicts Backport PR wich git cherry pick failed labels Jan 22, 2025
cferreiragonz and others added 2 commits January 22, 2025 10:23
Signed-off-by: cferreiragonz <[email protected]>
* Refs #22519. Add regression test

Signed-off-by: Juan Lopez Fernandez <[email protected]>

* Refs #22519. Decouple transport receivers creation using unique network flows

Signed-off-by: Juan Lopez Fernandez <[email protected]>

* Refs #22519. Add comment for future developers

Signed-off-by: Juan Lopez Fernandez <[email protected]>

* Refs #22519. Apply suggestion

Signed-off-by: Juan Lopez Fernandez <[email protected]>

* Refs #22519. Reuse unique ports for locators of same kind in a reader

Signed-off-by: Juan Lopez Fernandez <[email protected]>

---------

Signed-off-by: Juan Lopez Fernandez <[email protected]>
(cherry picked from commit e6e918f)
@cferreiragonz cferreiragonz force-pushed the mergify/bp/2.10.x/pr-5583 branch from 78bf8c4 to dd2a462 Compare January 22, 2025 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-pending PR which CI is running needs rebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants