Skip to content

[24110] Fix wrong update of default locators#6273

Merged
MiguelCompany merged 4 commits intomasterfrom
fix/reassign_locators
Jan 27, 2026
Merged

[24110] Fix wrong update of default locators#6273
MiguelCompany merged 4 commits intomasterfrom
fix/reassign_locators

Conversation

@cferreiragonz
Copy link
Contributor

@cferreiragonz cferreiragonz commented Jan 23, 2026

Description

This PR fixes a bug in which the defaultLocatorList was being wrongly updated after calling set_qos. This corner-case occurred only when the metatraffic locators are set, but the default ones are left empty (not configured) and Fast DDS automatically configures them. If in this situation the participant needs to perform mutation tries in one of their ports, the participant will not preserve the mutation tries value, and in later updates will wrongly update the locator.

Additionally I have refactor the communication tests to properly apply argument sleep_before_exec, which was being applied to the main thread rather than to the specific process.
Note that in the new test the seed is being specifically set, which translates into domain 31 (randomly selected). This is required to manually set the proper ports in the XML file configuration, which are mapped to the domain 31.

@Mergifyio backport 3.4.x 3.2.x 2.14.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.

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
@cferreiragonz cferreiragonz added this to the v3.5.0 milestone Jan 23, 2026
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
@github-actions github-actions bot added the ci-pending PR which CI is running label Jan 23, 2026
@mergify
Copy link
Contributor

mergify bot commented Jan 23, 2026

🧪 CI Insights

Here's what we observed from your CI run for 90b169b.

❌ Job Failures

Pipeline Job Health on master Retries 🔍 CI Insights 📄 Logs
Fast DDS MacOS CI mac-ci / fastdds_test () Unknown 0 View View
Fast DDS Windows CI windows-ci / fastdds_test (RelWithDebInfo, examples), v142 Unknown 0 View View
windows-ci / fastdds_test (RelWithDebInfo, examples), v143 Unknown 0 View View

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
@MiguelCompany MiguelCompany requested review from richiprosima and removed request for richiprosima January 26, 2026 10:40
@MiguelCompany MiguelCompany merged commit 74adc61 into master Jan 27, 2026
25 of 28 checks passed
@MiguelCompany MiguelCompany deleted the fix/reassign_locators branch January 27, 2026 08:31
@MiguelCompany
Copy link
Member

@Mergifyio backport 3.4.x 3.2.x 2.14.x

@mergify
Copy link
Contributor

mergify bot commented Jan 27, 2026

backport 3.4.x 3.2.x 2.14.x

✅ Backports have been created

Details

Cherry-pick of 74adc61 has failed:

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

You are currently cherry-picking commit 74adc61e7.
  (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
	modified:   test/dds/communication/CMakeLists.txt
	modified:   test/dds/communication/SubscriberMain.cpp
	new file:   test/dds/communication/custom_metatraffic_but_empty_default.json
	new file:   test/dds/communication/custom_metatraffic_but_empty_default_pub.xml
	new file:   test/dds/communication/custom_metatraffic_but_empty_default_sub.xml
	modified:   test/dds/communication/test_build.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   src/cpp/rtps/participant/RTPSParticipantImpl.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 bot pushed a commit that referenced this pull request Jan 27, 2026
* Refs #24110: Regression test

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #24110: Make default unicast port independent

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #24110: Uncrustify

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #24110: Review

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

---------

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
(cherry picked from commit 74adc61)
mergify bot pushed a commit that referenced this pull request Jan 27, 2026
* Refs #24110: Regression test

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #24110: Make default unicast port independent

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #24110: Uncrustify

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #24110: Review

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

---------

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
(cherry picked from commit 74adc61)
mergify bot pushed a commit that referenced this pull request Jan 27, 2026
* Refs #24110: Regression test

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #24110: Make default unicast port independent

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #24110: Uncrustify

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #24110: Review

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

---------

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
(cherry picked from commit 74adc61)

# Conflicts:
#	src/cpp/rtps/participant/RTPSParticipantImpl.cpp
MiguelCompany pushed a commit that referenced this pull request Jan 28, 2026
* Fix wrong update of default locators (#6273)

* Refs #24110: Regression test

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #24110: Make default unicast port independent

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #24110: Uncrustify

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #24110: Review

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

---------

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
(cherry picked from commit 74adc61)

# Conflicts:
#	src/cpp/rtps/participant/RTPSParticipantImpl.cpp

* Solve Conflicts

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Uncrustify

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

---------

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Co-authored-by: Carlos Ferreira González <carlosferreira@eprosima.com>
MiguelCompany pushed a commit that referenced this pull request Mar 6, 2026
* Refs #24110: Regression test

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #24110: Make default unicast port independent

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #24110: Uncrustify

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #24110: Review

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

---------

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
(cherry picked from commit 74adc61)
MiguelCompany pushed a commit that referenced this pull request Mar 10, 2026
* Refs #24110: Regression test



* Refs #24110: Make default unicast port independent



* Refs #24110: Uncrustify



* Refs #24110: Review



---------


(cherry picked from commit 74adc61)

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Co-authored-by: Carlos Ferreira González <carlosferreira@eprosima.com>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants