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

[20239] Make DataWriters always send the key hash on keyed topics #4238

Merged
merged 5 commits into from
Feb 2, 2024

Conversation

Mario-DL
Copy link
Member

@Mario-DL Mario-DL commented Jan 12, 2024

Description

This PR corrects the behavior of the DataWriters on keyed topics. Currently, if the DataReader does not expect_inline_qos, then the DataWriter is not sending the key despite of publishing on a keyed topic.

This PR makes the DataWriter always send the key regardless of the configuration of the reader if the topic is keyed.

Note: the builtin endpoints are retrieving the key in their listeners. In fact, its the first thing they do (computeKey()). It is true that they are the filling the instancehandle from the PID_ENDPOINT_GUID instead of the PID_KEY_HASH which could be arguable if we are strict, but in essence, both carry the same information, the complete guid of the entity

@Mergifyio backport 2.12.x 2.11.x 2.10.x 2.6.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
  • N/A 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.

@Mario-DL Mario-DL added this to the v2.13.2 milestone Jan 12, 2024
@Mario-DL Mario-DL added the needs-review PR that is ready to be reviewed label Jan 12, 2024
@Mario-DL
Copy link
Member Author

Checked that the topic keys feature works without enforcing the inline QoS in the reader when using this branch

@Mario-DL Mario-DL removed the needs-review PR that is ready to be reviewed label Jan 13, 2024
@Mario-DL
Copy link
Member Author

Before asking for the CI here, we should wait for #4261 to be merged

test/blackbox/common/BlackboxTestsKeys.cpp Outdated Show resolved Hide resolved
test/blackbox/common/BlackboxTestsKeys.cpp Outdated Show resolved Hide resolved
test/blackbox/common/BlackboxTestsKeys.cpp Outdated Show resolved Hide resolved
test/blackbox/common/BlackboxTestsKeys.cpp Outdated Show resolved Hide resolved
@Mario-DL Mario-DL force-pushed the hotfix/20239 branch 4 times, most recently from cd87725 to aa1a576 Compare January 25, 2024 06:52
@Mario-DL Mario-DL changed the base branch from master to hotfix/20257 January 25, 2024 09:02
Base automatically changed from hotfix/20257 to master January 27, 2024 08:16
@EduPonz
Copy link

EduPonz commented Jan 27, 2024

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

Copy link
Contributor

mergify bot commented Jan 27, 2024

backport 2.12.x 2.11.x 2.10.x 2.6.x

✅ Backports have been created

@EduPonz
Copy link

EduPonz commented Jan 27, 2024

@Mergifyio rebase master

Copy link
Contributor

mergify bot commented Jan 27, 2024

rebase master

❌ Base branch update has failed

Git reported the following error:

Rebasing (1/10)
Auto-merging test/blackbox/api/dds-pim/PubSubReader.hpp
CONFLICT (content): Merge conflict in test/blackbox/api/dds-pim/PubSubReader.hpp
Auto-merging test/blackbox/api/fastrtps_deprecated/PubSubReader.hpp
CONFLICT (content): Merge conflict in test/blackbox/api/fastrtps_deprecated/PubSubReader.hpp
error: could not apply a4712168... Refs #20257: Add regression test
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply a4712168... Refs #20257: Add regression test

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
… not null instancehandle should be expected

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
@JesusPoderoso
Copy link
Contributor

@richiprosima please test this

@MiguelCompany MiguelCompany changed the title [20239] Make DataWriters always send the serialized key on keyed topics [20239] Make DataWriters always send the key hash on keyed topics Jan 30, 2024
@EduPonz EduPonz merged commit 4d8c489 into master Feb 2, 2024
10 of 12 checks passed
@EduPonz EduPonz deleted the hotfix/20239 branch February 2, 2024 06:33
mergify bot pushed a commit that referenced this pull request Feb 2, 2024
* Refs #20239: Add regression test

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

* Refs #20239: Fix

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

* Refs #20239: Linter

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

* Refs #20239: Change some assert logic in DDSStatus tests since now, a not null instancehandle should be expected

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

* Refs #20239: Apply rev suggestions

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

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
(cherry picked from commit 4d8c489)
mergify bot pushed a commit that referenced this pull request Feb 2, 2024
* Refs #20239: Add regression test

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

* Refs #20239: Fix

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

* Refs #20239: Linter

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

* Refs #20239: Change some assert logic in DDSStatus tests since now, a not null instancehandle should be expected

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

* Refs #20239: Apply rev suggestions

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

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
(cherry picked from commit 4d8c489)
mergify bot pushed a commit that referenced this pull request Feb 2, 2024
* Refs #20239: Add regression test

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

* Refs #20239: Fix

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

* Refs #20239: Linter

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

* Refs #20239: Change some assert logic in DDSStatus tests since now, a not null instancehandle should be expected

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

* Refs #20239: Apply rev suggestions

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

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
(cherry picked from commit 4d8c489)
mergify bot pushed a commit that referenced this pull request Feb 2, 2024
* Refs #20239: Add regression test

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

* Refs #20239: Fix

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

* Refs #20239: Linter

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

* Refs #20239: Change some assert logic in DDSStatus tests since now, a not null instancehandle should be expected

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

* Refs #20239: Apply rev suggestions

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

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
(cherry picked from commit 4d8c489)

# Conflicts:
#	test/blackbox/common/DDSBlackboxTestsListeners.cpp
MiguelCompany pushed a commit that referenced this pull request Feb 14, 2024
* Refs #20239: Add regression test

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

* Refs #20239: Fix

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

* Refs #20239: Linter

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

* Refs #20239: Change some assert logic in DDSStatus tests since now, a not null instancehandle should be expected

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

* Refs #20239: Apply rev suggestions

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

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
(cherry picked from commit 4d8c489)
MiguelCompany pushed a commit that referenced this pull request Feb 14, 2024
)

* Refs #20239: Add regression test

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

* Refs #20239: Fix

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

* Refs #20239: Linter

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

* Refs #20239: Change some assert logic in DDSStatus tests since now, a not null instancehandle should be expected

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

* Refs #20239: Apply rev suggestions

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

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
(cherry picked from commit 4d8c489)

Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
EduPonz pushed a commit that referenced this pull request Mar 4, 2024
* Refs #20239: Add regression test

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

* Refs #20239: Fix

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

* Refs #20239: Linter

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

* Refs #20239: Change some assert logic in DDSStatus tests since now, a not null instancehandle should be expected

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

* Refs #20239: Apply rev suggestions

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

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
(cherry picked from commit 4d8c489)

# Conflicts:
#	test/blackbox/common/DDSBlackboxTestsListeners.cpp
MiguelCompany pushed a commit that referenced this pull request Mar 6, 2024
* Refs #20239: Add regression test

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

* Refs #20239: Fix

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

* Refs #20239: Linter

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

* Refs #20239: Change some assert logic in DDSStatus tests since now, a not null instancehandle should be expected

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

* Refs #20239: Apply rev suggestions

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

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
(cherry picked from commit 4d8c489)
EduPonz pushed a commit that referenced this pull request Mar 6, 2024
)

* Make DataWriters always send the key hash on keyed topics (#4238)

* Refs #20239: Add regression test

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

* Refs #20239: Fix

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

* Refs #20239: Linter

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

* Refs #20239: Change some assert logic in DDSStatus tests since now, a not null instancehandle should be expected

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

* Refs #20239: Apply rev suggestions

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

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
(cherry picked from commit 4d8c489)

# Conflicts:
#	test/blackbox/common/DDSBlackboxTestsListeners.cpp

* Refs #20239: Fix conflicts

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

---------

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
Co-authored-by: JesusPoderoso <jesuspoderoso@eprosima.com>
MiguelCompany pushed a commit that referenced this pull request Mar 8, 2024
)

* Refs #20239: Add regression test

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

* Refs #20239: Fix

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

* Refs #20239: Linter

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

* Refs #20239: Change some assert logic in DDSStatus tests since now, a not null instancehandle should be expected

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

* Refs #20239: Apply rev suggestions

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

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
(cherry picked from commit 4d8c489)

Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
elianalf pushed a commit that referenced this pull request Mar 12, 2024
* Refs #20239: Add regression test

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

* Refs #20239: Fix

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

* Refs #20239: Linter

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

* Refs #20239: Change some assert logic in DDSStatus tests since now, a not null instancehandle should be expected

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

* Refs #20239: Apply rev suggestions

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

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
(cherry picked from commit 4d8c489)
EduPonz pushed a commit that referenced this pull request Mar 12, 2024
)

* Refs #20239: Add regression test

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

* Refs #20239: Fix

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

* Refs #20239: Linter

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

* Refs #20239: Change some assert logic in DDSStatus tests since now, a not null instancehandle should be expected

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

* Refs #20239: Apply rev suggestions

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

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
(cherry picked from commit 4d8c489)

Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants