Skip to content

[23523] Return sample notifying changes on instance state (backport #5943)#5957

Merged
MiguelCompany merged 1 commit into2.14.xfrom
mergify/bp/2.14.x/pr-5943
Jul 30, 2025
Merged

[23523] Return sample notifying changes on instance state (backport #5943)#5957
MiguelCompany merged 1 commit into2.14.xfrom
mergify/bp/2.14.x/pr-5943

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Jul 24, 2025

Description

Fixes a bug where changes in the instance state coming from internal events (unmatching, liveliness lost, deadline missed) were not notified with a fake sample (i.e. no data and info.valid_data equal false)

@Mergifyio backport 3.3.x 3.2.x 2.14.x

Contributor Checklist

  • Commit messages follow the project guidelines.

  • The code follows the style guidelines of this project.

  • 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

  • Any new/modified methods have been properly documented using Doxygen.

  • N/A: Any new configuration API has an equivalent XML API (with the corresponding XSD extension)

  • Changes are backport compatible: they do NOT break ABI nor change library core behavior.

  • Changes are API compatible.

  • N/A: New feature has been added to the versions.md file (if applicable).

  • N/A: New feature has been documented/Current behavior is correctly described in the documentation.

  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • If this is a critical bug fix, backports to the critical-only supported branches have been requested.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

This is an automatic backport of pull request #5943 done by [Mergify](https://mergify.com).

@mergify mergify bot added the conflicts Backport PR wich git cherry pick failed label Jul 24, 2025
@mergify
Copy link
Contributor Author

mergify bot commented Jul 24, 2025

Cherry-pick of 16b7477 has failed:

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

You are currently cherry-picking commit 16b7477b.
  (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:   src/cpp/fastdds/subscriber/DataReaderImpl/ReadTakeCommand.hpp
	modified:   src/cpp/fastdds/subscriber/history/DataReaderHistory.cpp
	modified:   src/cpp/fastdds/subscriber/history/DataReaderInstance.hpp
	modified:   test/blackbox/common/DDSBlackboxTestsDataReader.cpp
	modified:   test/unittest/dds/subscriber/DataReaderTests.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   src/cpp/fastdds/subscriber/DataReaderImpl.cpp
	both modified:   src/cpp/fastdds/subscriber/history/DataReaderHistory.hpp
	both modified:   test/blackbox/api/dds-pim/PubSubReader.hpp
	both modified:   test/blackbox/common/DDSBlackboxTestsMonitorService.cpp
	both modified:   test/performance/latency/LatencyTestPublisher.cpp
	both modified:   test/performance/latency/LatencyTestSubscriber.cpp

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

@MiguelCompany MiguelCompany added this to the v2.14.5 milestone Jul 24, 2025
@rsanchez15 rsanchez15 modified the milestones: v2.14.5, v2.14.6 Jul 29, 2025
@MiguelCompany MiguelCompany force-pushed the mergify/bp/2.14.x/pr-5943 branch from 8fbb699 to dfe3d54 Compare July 29, 2025 14:02
@MiguelCompany MiguelCompany removed the conflicts Backport PR wich git cherry pick failed label Jul 29, 2025
@MiguelCompany MiguelCompany self-requested a review July 29, 2025 14:03
@github-actions github-actions bot added the ci-pending PR which CI is running label Jul 29, 2025
@MiguelCompany MiguelCompany modified the milestones: v2.14.6, v2.14.5 Jul 29, 2025
* Refs #22929. Add regression blackbox test.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22929. Improve test with listener.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22929. Add `has_fake_sample` to `DataReaderInstance`.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22929. Manage state of `has_fake_sample`.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22929. Handle `has_fake_sample` on `ReadTakeCommand`.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22929. Avoid removing instances with fake sample.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22929. Add instances with fake sample to `data_available_instances_`.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22929. Method `writer_not_alive` returns whether a fake sample was added.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22929. Add fake sample independently of remaining samples

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22929. Notify data_available when adding a fake sample.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22929. Remove shortcut for returning NO_DATA.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22929. Avoid processing fake samples in PubSubReader.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22929. Avoid processing fake samples in DDSBlackboxTestsMonitorService.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22929. Fix DataReaderTests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22929. Fix Latency tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22929. Rename `fake` into `state notification`.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22929. Use HANDLE_NIL for publication handle.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22929. Use NIL publication handle to discard samples in tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #22929. Use scoped name for HANDLE_NIL.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
@MiguelCompany MiguelCompany force-pushed the mergify/bp/2.14.x/pr-5943 branch from dfe3d54 to fa3b76f Compare July 29, 2025 14:19
@MiguelCompany MiguelCompany requested review from cferreiragonz and removed request for MiguelCompany July 29, 2025 14:21
@MiguelCompany MiguelCompany merged commit c8c509c into 2.14.x Jul 30, 2025
20 checks passed
@MiguelCompany MiguelCompany deleted the mergify/bp/2.14.x/pr-5943 branch July 30, 2025 06:23
MiguelCompany added a commit that referenced this pull request Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-pending PR which CI is running

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants