Skip to content

Subscription and intra-process subscription counts are not updated in sync #668

@cvasfi

Description

@cvasfi

Bug report

Intra-process subscription count of Publisher is not updated in sync with the subscription count when intra-process communication is used.
When the get_subscription_count() method returns the updated count, get_intra_process_subscription_count() may not return the updated count yet. This behaviour causes the unit tests in test_publisher_subscription_count_api to fail occasionally.

Required Info:

  • Operating System:
    • Ubuntu 16.04
  • Installation type:
    • Source
  • Version or commit hash:
  • DDS implementation:
    • Fast-RTPS
  • Client library (if applicable):
    • rclcpp

Steps to reproduce issue

Repeat the unit test test_publisher_subscription_count_api until failure. Though this may be hard to reproduce locally, here's an instance of such a failure: https://ci.ros2.org/view/nightly/job/nightly_linux_repeated/1323/testReport/(root)/projectroot/test_publisher_subscription_count_api/

Above test logs shows that the equality conditions on get_subscription_count() are satisfied yet the conditions on get_intra_process_subscription_count() are not met.

Expected behavior

get_subscription_count() and get_intra_process_subscription_count() methods should be in sync when intra-process communication is used.

Actual behavior

The methods return different results.

Additional information

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions