Skip to content

Conversation

@MiguelCompany
Copy link
Member

Description

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.
  • 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.
  • New feature has been added to the versions.md file (if applicable).
  • 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.

@github-actions github-actions bot added the ci-pending PR which CI is running label Jan 30, 2026
@MiguelCompany MiguelCompany marked this pull request as draft January 30, 2026 07:48
@raulojeda22 raulojeda22 requested review from richiprosima and removed request for richiprosima January 30, 2026 08:34
Comment on lines +1202 to +1207
// virtual - needs info and give none
// local - needs info and give info
// external - needs none and give info
// writer needs info = add writer participant in reader ack list
// writer give info = add reader participant in writer ack list

Copy link
Contributor

@cferreiragonz cferreiragonz Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This info is also written below in another comment. I would delete this one

Comment on lines +1230 to +1235
const bool writer_needs_info = writer_is_virtual || writer_is_local;
const bool writer_gives_info = writer_is_local || (writer_is_external && reader_is_local);

const bool reader_needs_info = reader_is_virtual || reader_is_local;
const bool reader_gives_info = reader_is_local || (reader_is_external && writer_is_local);

Copy link
Contributor

@cferreiragonz cferreiragonz Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we still might be missing some cases. For example:
If a writer is local (gives and needs) and a reader is virtual (only needs) we should only allow information flow from the writer to the reader.

However, if the reader is virtual AND local (two servers connected between each other), the reader still gives info to the writer, as writer_needs_info is True because it is local and reader_gives_info is True because it is also local. Note that an endpoint can be both local and virtual, they are not exclusive.

We could do something like const bool reader_gives_info = !reader_is_virtual && (reader_is_local || (reader_is_external && writer_is_local));

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.

4 participants