Repository navigation
Conversation
…s metatraffic locators When a known remote participant keeps its GUID but announces different metatraffic locators (for example, because its IP address changed), the participant proxy data is updated, but the builtin endpoints already matched with it keep sending to the old locators: - The SPDP writer keeps sending unicast announcements to the old locator. - With Simple EDP, the existing SEDP writer and reader proxies are not updated, so HEARTBEAT, DATA and ACKNACK keep going to the old locators. Add PDPSimple::update_remote_builtin_locators(), called from PDPListener::process_alive_data() when the metatraffic locators of a known participant change: - The SPDP writer updates the locators of the remote SPDP reader, only if it is already matched. This is also done with Static EDP. - If the Simple EDP endpoints are already matched with that participant, they are matched again with assignRemoteEndpoints(pdata, false), which updates the existing proxies in place, keeping their reliability state. The first matching is left to PDPSimple::assignRemoteEndpoints(), after the new participant has been notified (and maybe ignored). - This refresh is skipped when the local participant has security enabled. Add two blackbox regression tests in RTPSBlackboxTestsLocatorUpdates.cpp. A fake remote participant announces a new metatraffic locator on another port, and the test transport's locator filter checks that SPDP and SEDP traffic goes to the new locator and no longer to the old one. Signed-off-by: Takuto Kajimura <tiharu717@gmail.com>
tauto1127
marked this pull request as ready for review
December 4, 2026 05:06
MiguelCompany
left a comment
Member
There was a problem hiding this comment.
AFAICT, the intended behavior of this PR shall be achieved through the code in lines 247-250:
if (parent_pdp_->updateInfoMatchesEDP())
{
parent_pdp_->mp_EDP->assignRemoteEndpoints(*old_data, true);
}
This branch has not been deployed
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.
Description
A participant may change its IP address at run time while keeping its GUID, for example a mobile robot roaming
between networks, a device that gets a new DHCP lease, or a process that is checkpointed and restored on another
host. After such a change, Fast DDS keeps sending part of its discovery traffic to the old address of that
participant, as described below.
When a remote participant that has already been discovered keeps its GUID but announces different metatraffic
locators (for example, because its IP address changed),
PDPListenerupdates the participant proxy data, but thebuiltin endpoints that are already matched with it keep sending to the old locators:
continue to be sent to the old locators. If SEDP DATA for a new endpoint of that participant is lost, it is not
repaired, and the endpoint may not be discovered.
This PR covers the Simple discovery protocol (
PDPSimple). Discovery Server clients and servers are not changed.This PR adds
PDPSimple::update_remote_builtin_locators(), called fromPDPListener::process_alive_data()when themetatraffic locators of a known participant change:
updated in the same way when Static EDP is used, and the static remote endpoints keep being reassigned on every
update as before.
assignRemoteEndpoints(pdata, false), which updates the existing proxies in place. Their reliability state iskept. The first matching is left to
PDPSimple::assignRemoteEndpoints(), which runs after the user has beennotified of the new participant and has had the chance to ignore it.
No virtual method is added, so the change is ABI compatible and can be backported.
OpenDDS handled a similar problem in OpenDDS/OpenDDS#1365, which both detects local network changes and updates
the transport to use the new locators for remote participants. This PR only covers the second part: following the
new locators announced by a known remote participant. Detecting local network changes is out of scope.
On the announcing side, when
DomainParticipant::set_qos()is called, Fast DDS already recomputes the locators itgenerated from the network interfaces, and re-announces them if they changed; this PR makes the receiving side
follow such announcements.
User endpoints already follow such changes through SEDP when the remote participant re-announces them with the new
locators; this PR lets the builtin SEDP endpoints keep exchanging that data with the new address.
Two regression tests are added in
RTPSBlackboxTestsLocatorUpdates.cpp. In each one, a fake remote participantannounces a metatraffic locator, then announces a new one on another port while keeping its GUID. The local
participant uses the test UDP transport, and its locator filter checks that traffic goes to the new locator and no
longer to the old one:
RTPSLocatorUpdates.sedp_follows_participant_metatraffic_locatorRTPSLocatorUpdates.spdp_follows_participant_metatraffic_locatorThe tests do not use fixed sleeps. Results with
--gtest_repeat=10(Release build on Ubuntu 22.04):5fffb06c3): 20/20 failures (both tests fail in every repetition).Not covered by this PR
PDPClient,PDPServer).DomainParticipant::set_qos().by the first matching, which uses the locators it had copied earlier. This already happens on master; this PR only
ensures that no Simple EDP match is created before the user has been notified of the new participant.
@Mergifyio backport 3.6.x
Contributor Checklist
builtin endpoints already matched with it send to the new locators instead of the old ones.
versions.mdfile (if applicable).Reviewer Checklist