Skip to content

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

Merged
MiguelCompany merged 1 commit into3.3.xfrom
mergify/bp/3.3.x/pr-5943
Jul 29, 2025
Merged

[23523] Return sample notifying changes on instance state (backport #5943)#5955
MiguelCompany merged 1 commit into3.3.xfrom
mergify/bp/3.3.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).

* 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>
(cherry picked from commit 16b7477)
@MiguelCompany MiguelCompany added this to the v3.3.1 milestone Jul 24, 2025
@MiguelCompany MiguelCompany self-requested a review July 24, 2025 15:04
@github-actions github-actions bot added the ci-pending PR which CI is running label Jul 24, 2025
@MiguelCompany MiguelCompany merged commit 5d84e2e into 3.3.x Jul 29, 2025
36 of 37 checks passed
@MiguelCompany MiguelCompany deleted the mergify/bp/3.3.x/pr-5943 branch July 29, 2025 13:09
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.

1 participant