Skip to content

[20584] Effectively assert automatic/manual_by_participant liveliness (backport #4501) #4596

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 21, 2024

Description

This PR brings a bugfix when asserting AUTOMATIC MANUAL_BY_PARTICIPANT liveliness kinds. In the scenario of having a participant with two datareaders (each of them with a lease duration of 2 secs) and other two participants with one publisher each one configured with AUTOMATIC_LIVELINESS. If we suddenly kill one of the publishers (network disconnection or Ctrl+C), the on_liveliness_changed() is not received on the reader side when we would expect it to happen (after 2 secs).

The problem stems from the fact that currently, in the reader-side participant, it is enough having an alive writer with the same kind (AUTOMATIC_LIVELINESS) to assert the liveliness of all of its readers with the same kind regardless of the participant.

This PR makes the liveliness assertion participant-aware by means of the guidPrefix.

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

Fixes #4373

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.

  • Changes are ABI compatible.

  • 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.
  • 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 #4501 done by [Mergify](https://mergify.com).

* Refs #20584: Add BB test

Signed-off-by: Mario Dominguez <[email protected]>

* Refs #20584: Fix

Signed-off-by: Mario Dominguez <[email protected]>

* Refs #20584: Update LivelinessManager tests

Signed-off-by: Mario Dominguez <[email protected]>

* Refs #20584: Linter

Signed-off-by: Mario Dominguez <[email protected]>

* Refs #20584: Apply reviewer suggestions

Signed-off-by: Mario Dominguez <[email protected]>

* Refs #20584: Fix PubSubParticipant comparison and add padding between writer announcement period and lease duration test's writers

Signed-off-by: Mario Dominguez <[email protected]>

---------

Signed-off-by: Mario Dominguez <[email protected]>
(cherry picked from commit f708244)
@Mario-DL
Copy link
Member

@richiprosima please test this

@Mario-DL Mario-DL added the ci-pending PR which CI is running label Mar 21, 2024
@Mario-DL
Copy link
Member

@richiprosima please test mac

1 similar comment
@Mario-DL
Copy link
Member

@richiprosima please test mac

@Mario-DL Mario-DL added ready-to-merge Ready to be merged. CI and changes have been reviewed and approved. and removed ci-pending PR which CI is running labels Mar 25, 2024
@EduPonz EduPonz merged commit 62a752f into 2.6.x Mar 26, 2024
@EduPonz EduPonz deleted the mergify/bp/2.6.x/pr-4501 branch March 26, 2024 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Ready to be merged. CI and changes have been reviewed and approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants