eProsima / Fast-DDS

The most complete DDS - Proven: Plenty of success cases. Looking for commercial support? Contact info@eprosima.com
https://eprosima.com
Apache License 2.0
2.06k stars 738 forks source link

[20816] Properly delete builtin statistics writers upon `delete_contained_entities()` (backport #4891) #4917

Closed mergify[bot] closed 1 month ago

mergify[bot] commented 1 month ago

Description

This PR fixes a wrong behavior that occurs when closing an application making an intensive use of statistics. If in the shutdown pipeline, after a manual removal of entities (delete_datareader, delete_subscriber, delete_topic) if delete_contained_entities() was called, it caused a race when alive endpoints try to keep using the statistics builtin endpoints (writers).

@Mergifyio backport 2.14.x 2.13.x 2.10.x 2.6.x

Contributor Checklist

Reviewer Checklist

mergify[bot] commented 1 month ago

Cherry-pick of 0d62335cc86dbe8cb43d347acf9bde547de179d4 has failed:

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

You are currently cherry-picking commit 0d62335cc.
  (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:   test/blackbox/common/DDSBlackboxTestsStatistics.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
    both modified:   src/cpp/statistics/fastdds/domain/DomainParticipantImpl.cpp
    both modified:   src/cpp/statistics/fastdds/domain/DomainParticipantImpl.hpp

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