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
[X] Commit messages follow the project guidelines.
[X] The code follows the style guidelines of this project.
[X] 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
[X] Any new/modified methods have been properly documented using Doxygen.
[x] Any new configuration API has an equivalent XML API (with the corresponding XSD extension)
[X] Changes are backport compatible: they do NOT break ABI nor change library core behavior.
[X] Changes are API compatible.
[X] New feature has been added to the versions.md file (if applicable).
[X] New feature has been documented/Current behavior is correctly described in the documentation.
[X] Applicable backports have been included in the description.
Reviewer Checklist
[x] The PR has a milestone assigned.
[x] The title and description correctly express the PR's purpose.
[x] Check contributor checklist is correct.
[x] Check CI results: changes do not issue any warning.
[x] Check CI results: failing tests are unrelated with the changes.
* [#4914 [20816] Properly delete builtin statistics writers upon `delete_contained_entities()` (backport #4891)](https://github.com/eProsima/Fast-DDS/pull/4914) has been created for branch `2.14.x` but encountered conflicts
* [#4915 [20816] Properly delete builtin statistics writers upon `delete_contained_entities()` (backport #4891)](https://github.com/eProsima/Fast-DDS/pull/4915) has been created for branch `2.13.x` but encountered conflicts
* [#4916 [20816] Properly delete builtin statistics writers upon `delete_contained_entities()` (backport #4891)](https://github.com/eProsima/Fast-DDS/pull/4916) has been created for branch `2.10.x` but encountered conflicts
* [#4917 [20816] Properly delete builtin statistics writers upon `delete_contained_entities()` (backport #4891)](https://github.com/eProsima/Fast-DDS/pull/4917) has been created for branch `2.6.x` but encountered conflicts
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
) ifdelete_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
versions.md
file (if applicable).Reviewer Checklist