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

[20508] TCP first message loss (backport #4454) #4561

Closed
wants to merge 1 commit into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 15, 2024

Description

In the initial TCP logical port negotiation some logical port requests were missing. This would not prevent communication as those remaining requests would be sent on the first data sent to that logical port. However, that data would be discarded.

With this PR all discovered logical ports are requested on initialization and the first data would not need to be discarded.

@Mergifyio backport 2.13.x 2.12.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).
  • New feature has been documented/Current behavior is correctly described in the documentation.
    Related documentation PR: [20508] TCP first message loss Fast-DDS-docs#699
  • 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.
  • 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 #4454 done by [Mergify](https://mergify.com).

* Refs #20508: add remaining add_logical_port calls

Signed-off-by: Jesus Perez <jesusperez@eprosima.com>

* Refs #20508: Add unittests

Signed-off-by: Jesus Perez <jesusperez@eprosima.com>

* Refs #20508: Add blackbox test + uncomment section (commented for testing purposes)

Signed-off-by: Jesus Perez <jesusperez@eprosima.com>

* Refs #20508: Add blackbox tests + functional fixes

Signed-off-by: Jesus Perez <jesusperez@eprosima.com>

* Refs #20508: Fix tests

Signed-off-by: Jesus Perez <jesusperez@eprosima.com>

* Refs #20508: Add cv + fix windows tests

Signed-off-by: Jesus Perez <jesusperez@eprosima.com>

* Refs #20508. Use lock_guard where apropiate.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20508. Proxy is_local_port_opened.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20508. Refactor wait_logical_port_under_negotiation.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20508: Apply suggestions

Signed-off-by: Jesus Perez <jesusperez@eprosima.com>

* Refs #20508: Fix typo

Signed-off-by: Jesus Perez <jesusperez@eprosima.com>

* Refs #20508: Add wait_for_logical_port_negotiation_ms to transport descriptor

Signed-off-by: Jesus Perez <jesusperez@eprosima.com>

* Refs #20508: Apply suggestions - firs message loss related

Signed-off-by: Jesus Perez <jesusperez@eprosima.com>

* Refs #20508: Apply suggestions - transport descriptor related

Signed-off-by: Jesus Perez <jesusperez@eprosima.com>

* Refs #20508: Reuse unused transport descriptor tcp_negotiation_timeout

Signed-off-by: Jesus Perez <jesusperez@eprosima.com>

* Refs #20508: Change timeout behavior

Signed-off-by: Jesus Perez <jesusperez@eprosima.com>

* Refs #20508: Uncrustify

Signed-off-by: Jesus Perez <jesusperez@eprosima.com>

* Refs #20508: Fix xml parser

Signed-off-by: Jesus Perez <jesusperez@eprosima.com>

* Refs #20508: Undo fastcdr commit change

Signed-off-by: Jesus Perez <jesusperez@eprosima.com>

---------

Signed-off-by: Jesus Perez <jesusperez@eprosima.com>
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 8103cf0)

# Conflicts:
#	include/fastdds/rtps/transport/TCPTransportDescriptor.h
#	include/fastrtps/xmlparser/XMLParserCommon.h
#	resources/xsd/fastRTPS_profiles.xsd
#	src/cpp/rtps/transport/TCPTransportInterface.cpp
#	src/cpp/rtps/transport/TCPTransportInterface.h
#	src/cpp/rtps/xmlparser/XMLParser.cpp
#	src/cpp/rtps/xmlparser/XMLParserCommon.cpp
#	test/blackbox/common/BlackboxTestsTransportTCP.cpp
#	test/mock/rtps/TCPTransportDescriptor/fastrtps/transport/TCPTransportDescriptor.h
#	test/system/tools/xmlvalidation/XMLTesterExample_profile.xml
#	test/system/tools/xmlvalidation/all_profile.xml
#	test/unittest/transport/TCPv4Tests.cpp
#	test/unittest/transport/TCPv6Tests.cpp
#	test/unittest/transport/mock/MockTCPv4Transport.h
#	test/unittest/transport/mock/MockTCPv6Transport.h
#	test/unittest/xmlparser/XMLParserTests.cpp
@mergify mergify bot added the conflicts Backport PR wich git cherry pick failed label Mar 15, 2024
Copy link
Contributor Author

mergify bot commented Mar 15, 2024

Cherry-pick of 8103cf0 has failed:

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

You are currently cherry-picking commit 8103cf042.
  (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/attributes/RTPSParticipantAttributes.cpp
	modified:   src/cpp/rtps/transport/TCPChannelResource.cpp
	modified:   src/cpp/rtps/transport/TCPChannelResource.h
	modified:   src/cpp/rtps/transport/tcp/RTCPMessageManager.cpp
	modified:   test/blackbox/api/dds-pim/PubSubReader.hpp
	modified:   test/blackbox/api/dds-pim/PubSubWriter.hpp
	modified:   test/blackbox/api/fastrtps_deprecated/PubSubReader.hpp
	modified:   test/blackbox/api/fastrtps_deprecated/PubSubWriter.hpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   include/fastdds/rtps/transport/TCPTransportDescriptor.h
	both modified:   include/fastrtps/xmlparser/XMLParserCommon.h
	both modified:   resources/xsd/fastRTPS_profiles.xsd
	both modified:   src/cpp/rtps/transport/TCPTransportInterface.cpp
	both modified:   src/cpp/rtps/transport/TCPTransportInterface.h
	both modified:   src/cpp/rtps/xmlparser/XMLParser.cpp
	both modified:   src/cpp/rtps/xmlparser/XMLParserCommon.cpp
	both modified:   test/blackbox/common/BlackboxTestsTransportTCP.cpp
	both modified:   test/mock/rtps/TCPTransportDescriptor/fastrtps/transport/TCPTransportDescriptor.h
	both modified:   test/system/tools/xmlvalidation/XMLTesterExample_profile.xml
	both modified:   test/system/tools/xmlvalidation/all_profile.xml
	both modified:   test/unittest/transport/TCPv4Tests.cpp
	both modified:   test/unittest/transport/TCPv6Tests.cpp
	both modified:   test/unittest/transport/mock/MockTCPv4Transport.h
	both modified:   test/unittest/transport/mock/MockTCPv6Transport.h
	both modified:   test/unittest/xmlparser/XMLParserTests.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

@mergify mergify bot mentioned this pull request Mar 15, 2024
13 tasks
@JesusPoderoso
Copy link
Contributor

Fast DDS v2.12.2 has been frozen due to its EOL. No more backports to 2.12.x are going to be addressed.

@mergify mergify bot deleted the mergify/bp/2.12.x/pr-4454 branch March 15, 2024 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflicts Backport PR wich git cherry pick failed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants