Skip to content
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

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

Merged
merged 1 commit into from
Mar 31, 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).

@JesusPoderoso
Copy link
Contributor

@richiprosima please test this

@JesusPoderoso JesusPoderoso added the ci-pending PR which CI is running label Mar 22, 2024
@MiguelCompany
Copy link
Member

@Mergifyio rebase

* Refs #20584: Add BB test

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #20584: Fix

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #20584: Update LivelinessManager tests

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #20584: Linter

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #20584: Apply reviewer suggestions

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

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

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
(cherry picked from commit f708244)
Copy link
Contributor Author

mergify bot commented Mar 30, 2024

rebase

✅ Branch has been successfully rebased

@MiguelCompany
Copy link
Member

@richiprosima Please test this

@MiguelCompany
Copy link
Member

@richiprosima please test mac

@MiguelCompany MiguelCompany merged commit d2e1e3b into 2.10.x Mar 31, 2024
11 of 15 checks passed
@MiguelCompany MiguelCompany deleted the mergify/bp/2.10.x/pr-4501 branch March 31, 2024 21:00
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.

3 participants