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

[18257] Version compatibility issue for participant discovery when upgrading to version 2.10.1 #3460

Closed
1 task done
vfrcode opened this issue Apr 16, 2023 · 3 comments · Fixed by #3479
Closed
1 task done
Labels
doc-pending Issue or PR which is pending to be documented

Comments

@vfrcode
Copy link

vfrcode commented Apr 16, 2023

Is there an already existing issue for this?

  • I have searched the existing issues

Expected behavior

An application that has implemented the on_participant_discovery callback (having 2 parameters) and was compiled against the fastrtps library v2.10.0 was expected to still be able to discover new participants after upgrading the installed runtime library to v2.10.1.

Current behavior

The on_participant_discovery callback is never called when the runtime library is of version v2.10.1.

This is because the empty implementation of the on_participant_discovery callback function of DomainParticipantListener is inside the header file and is virtual, and therefore the compiled application has the empty implementation compiled into it. Version v2.10.1, however, relies on the new default implementation of the on_participant_discovery callback function with 3 parameters to relay the call to the on_participant_discovery with 2 parameters, but this new default implementation is not used by the application.

Hence, no application that uses this callback and was compiled with versions prior to v2.10.1 will be able to work properly when the runtime library is upgraded to v2.10.1.

Steps to reproduce

  1. Implement an application that implements the on_participant_discovery callback function that has 2 parameters.
  2. Build with v2.10.0
  3. Run the application with runtime library libfastrtps version v2.10.1
  4. Note that the callback is never called.

Fast DDS version/commit

The bug is introduced in commit 924593a (DomainParticipant::ignore_participant implementation (#3412).

Platform/Architecture

Ubuntu Focal 20.04 amd64

Transport layer

Default configuration, UDPv4 & SHM

Additional context

No response

XML configuration file

No response

Relevant log output

No response

Network traffic capture

No response

@vfrcode vfrcode added the triage Issue pending classification label Apr 16, 2023
@JesusPoderoso
Copy link
Contributor

Hello @vfrcode , thank you for the report.
The documentation would be updated to report this issue, and all empty implementations would be moved from the headers to the source files to prevent this problem from occurring in following releases.
Good catch!

@JesusPoderoso JesusPoderoso added doc-pending Issue or PR which is pending to be documented and removed triage Issue pending classification labels Apr 17, 2023
@vfrcode
Copy link
Author

vfrcode commented Apr 17, 2023

Hi Jesus,

A work-around for now would be to just call both callback functions instead of relying on the implementation of the one to relay the call to the other. I'm not sure whether the user of the library expects both callback function to be called, or only one of them. I did not see the header file describing the behavior, and thus, from my point of view, I would expect both callback functions to be called anyway if I'd have overridden them both.

This would make sure that existing application keep working after upgrading the runtime libaries to the newest version. Would this be an option ?

@MiguelCompany MiguelCompany changed the title Version compatibility issue for participant discovery when upgrading to version 2.10.1 [18257] Version compatibility issue for participant discovery when upgrading to version 2.10.1 Apr 21, 2023
@MiguelCompany
Copy link
Member

@vfrcode

A work-around for now would be to just call both callback functions...

In fact, I think this would be the only ABI-compatible way of tackling this. I went ahead and implemented this approach in #3479

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-pending Issue or PR which is pending to be documented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants