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

[20401] Check History QoS inconsistencies #4375

Merged
merged 5 commits into from
Feb 20, 2024
Merged

Conversation

JesusPoderoso
Copy link
Contributor

@JesusPoderoso JesusPoderoso commented Feb 12, 2024

Description

This PR introduces a check to ensure that the history QoS is consistent in both DataWriter and DataReader creation.
In this case, it checks that if history kind is set as KEEP_LAST, the history depth must be higher than zero.

Edit: Check between history depth and resource limits' max_samples_per_instance also included

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

Fixes #4365

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).
  • New feature has been documented/Current behavior is correctly described in the documentation.
    Related documentation PR: [20401] Improve History QoS documentation and compatibility rules Fast-DDS-docs#664
  • 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.

@JesusPoderoso JesusPoderoso added the ci-pending PR which CI is running label Feb 12, 2024
@JesusPoderoso JesusPoderoso added this to the v2.13.3 milestone Feb 12, 2024
@JesusPoderoso JesusPoderoso self-assigned this Feb 12, 2024
@JesusPoderoso JesusPoderoso added the needs-review PR that is ready to be reviewed label Feb 12, 2024
@JesusPoderoso JesusPoderoso changed the title [20379] Check History QoS inconsistencies [20401] Check History QoS inconsistencies Feb 12, 2024
@JesusPoderoso JesusPoderoso added to-do and removed ci-pending PR which CI is running labels Feb 12, 2024
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
…le_per_instance bounds

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
@JesusPoderoso JesusPoderoso added ci-pending PR which CI is running and removed to-do labels Feb 12, 2024
Copy link
Member

@Mario-DL Mario-DL left a comment

Choose a reason for hiding this comment

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

Changes makes sense to me and added tests assert the intended behavior.
Nonetheless there are a bunch of tests that needs to be fixed, mostly as a consequence of the consistency check between the max_samples_per_instance and history depth when KEEP_LAST.

For instance, the DDSDataWriter.HeartbeatWhileDestruction test would require setting the max_samples_per_instance datawriter qos to n_samples (1000) so that max_samples_per_instance >= history.depth

@Mario-DL
Copy link
Member

Mario-DL commented Feb 12, 2024

In addition, it would be necessary to specify in the docs/doxygen that KEEP LAST with 0 is an inconsistency

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
@JesusPoderoso
Copy link
Contributor Author

@richiprosima please test this

@JesusPoderoso JesusPoderoso removed the needs-review PR that is ready to be reviewed label Feb 14, 2024
@Mario-DL
Copy link
Member

@richiprosima please test mac

@elianalf
Copy link
Contributor

@richiprosima please test windows

@JesusPoderoso
Copy link
Contributor Author

@richiprosima please test mac

@JesusPoderoso
Copy link
Contributor Author

JesusPoderoso commented Feb 19, 2024

I've launched a documentation CI manual run with the latest doc PR updates.

@Mario-DL
Copy link
Member

@richiprosima please test mac

@JesusPoderoso JesusPoderoso 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 Feb 20, 2024
@JesusPoderoso
Copy link
Contributor Author

CI issues unrelated to the PR. Ready to merge!

Copy link
Member

@Mario-DL Mario-DL left a comment

Choose a reason for hiding this comment

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

LGTM

@EduPonz EduPonz merged commit 68acb5a into master Feb 20, 2024
18 of 22 checks passed
@EduPonz EduPonz deleted the hotfix/history_depth_bounds branch February 20, 2024 13:33
@EduPonz
Copy link
Member

EduPonz commented Feb 20, 2024

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

Copy link
Contributor

mergify bot commented Feb 20, 2024

backport 2.12.x 2.10.x 2.6.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Feb 20, 2024
* Refs #20401: Add regression test

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

* Refs #20401: Check History QoS inconsistencies

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

* Refs #20401: Check also the history depth vs resource limits max_sample_per_instance bounds

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

* Refs #20401: Update HeartbeatWhileDestruction test

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

* Refs #20401: Update unit test DDS profiles XML tests profile

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

---------

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
(cherry picked from commit 68acb5a)
MiguelCompany pushed a commit that referenced this pull request Feb 21, 2024
* Refs #20401: Add regression test

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

* Refs #20401: Check History QoS inconsistencies

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

* Refs #20401: Check also the history depth vs resource limits max_sample_per_instance bounds

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

* Refs #20401: Update HeartbeatWhileDestruction test

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

* Refs #20401: Update unit test DDS profiles XML tests profile

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

---------

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
(cherry picked from commit 68acb5a)

Co-authored-by: Jesús Poderoso <120394830+JesusPoderoso@users.noreply.github.com>
@michaelaeriksen
Copy link

michaelaeriksen commented Feb 22, 2024

This just broke my ros2 workspace. Now I get

[RTPS_QOS_CHECK Error] HISTORY DEPTH must be lower or equal to the max_samples_per_instance value. -> Function check_qos

when calling

rclcpp::Node::make_shared("Hello World");

@EduPonz
Copy link
Member

EduPonz commented Feb 22, 2024

This just broke my ros2 workspace. Now I get

[RTPS_QOS_CHECK Error] HISTORY DEPTH must be lower or equal to the max_samples_per_instance value. -> Function check_qos

when calling

rclcpp::Node::make_shared("Hello World");

Hi @michaelaeriksen, we realized this yesterday and have #4417 on the way to fix it, you can give it a try. In the mean time, the ROS 2 Rolling ros2.repos file was updated to pin Fast DDS to the commit previous to this one. In any case, it'd be fixed in some hours.

EduPonz pushed a commit that referenced this pull request Feb 24, 2024
* Refs #20401: Add regression test

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

* Refs #20401: Check History QoS inconsistencies

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

* Refs #20401: Check also the history depth vs resource limits max_sample_per_instance bounds

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

* Refs #20401: Update HeartbeatWhileDestruction test

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

* Refs #20401: Update unit test DDS profiles XML tests profile

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

---------

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
(cherry picked from commit 68acb5a)

# Conflicts:
#	src/cpp/fastdds/publisher/DataWriterImpl.cpp
#	src/cpp/fastdds/subscriber/DataReaderImpl.cpp
#	test/unittest/dds/profiles/test_xml_profiles.xml
elianalf pushed a commit that referenced this pull request Mar 5, 2024
* Refs #20401: Add regression test

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

* Refs #20401: Check History QoS inconsistencies

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

* Refs #20401: Check also the history depth vs resource limits max_sample_per_instance bounds

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

* Refs #20401: Update HeartbeatWhileDestruction test

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

* Refs #20401: Update unit test DDS profiles XML tests profile

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

---------

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
(cherry picked from commit 68acb5a)
EduPonz added a commit that referenced this pull request Mar 6, 2024
* Check History QoS inconsistencies (#4375)

* Refs #20401: Add regression test

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

* Refs #20401: Check History QoS inconsistencies

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

* Refs #20401: Check also the history depth vs resource limits max_sample_per_instance bounds

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

* Refs #20401: Update HeartbeatWhileDestruction test

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

* Refs #20401: Update unit test DDS profiles XML tests profile

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

---------

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
(cherry picked from commit 68acb5a)

* Fix SecureHelloworldExample (#4416)

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

* Just show warning when inconsistency between depth and max_samples_per_instance (#4417)

* Refs #20503. Add regression test

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

* Refs #20503. Show warning when depth > max_samples_per_instance

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

* Refs #20503. Fix InvalidQos tests

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

---------

Signed-off-by: EduPonz <eduardoponz@eprosima.com>
Co-authored-by: EduPonz <eduardoponz@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
Co-authored-by: Jesús Poderoso <120394830+JesusPoderoso@users.noreply.github.com>
Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
Co-authored-by: EduPonz <eduardoponz@eprosima.com>
@JesusPoderoso JesusPoderoso restored the hotfix/history_depth_bounds branch March 12, 2024 09:51
@JesusPoderoso JesusPoderoso deleted the hotfix/history_depth_bounds branch March 12, 2024 09:52
Mario-DL pushed a commit that referenced this pull request Mar 19, 2024
* Refs #20401: Add regression test

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

* Refs #20401: Check History QoS inconsistencies

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

* Refs #20401: Check also the history depth vs resource limits max_sample_per_instance bounds

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

* Refs #20401: Update HeartbeatWhileDestruction test

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

* Refs #20401: Update unit test DDS profiles XML tests profile

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

---------

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
(cherry picked from commit 68acb5a)

# Conflicts:
#	src/cpp/fastdds/publisher/DataWriterImpl.cpp
#	src/cpp/fastdds/subscriber/DataReaderImpl.cpp
#	test/unittest/dds/profiles/test_xml_profiles.xml
EduPonz added a commit that referenced this pull request Apr 10, 2024
* Check History QoS inconsistencies (#4375)

* Refs #20401: Add regression test

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

* Refs #20401: Check History QoS inconsistencies

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

* Refs #20401: Check also the history depth vs resource limits max_sample_per_instance bounds

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

* Refs #20401: Update HeartbeatWhileDestruction test

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

* Refs #20401: Update unit test DDS profiles XML tests profile

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

---------

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
(cherry picked from commit 68acb5a)

# Conflicts:
#	src/cpp/fastdds/publisher/DataWriterImpl.cpp
#	src/cpp/fastdds/subscriber/DataReaderImpl.cpp
#	test/unittest/dds/profiles/test_xml_profiles.xml

* Refs #20401: Fix conflicts

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

* Fix SecureHelloworldExample (#4416)

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

* Just show warning when inconsistency between depth and max_samples_per_instance (#4417)

* Refs #20503. Add regression test

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

* Refs #20503. Show warning when depth > max_samples_per_instance

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

* Refs #20503. Fix InvalidQos tests

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

---------

Signed-off-by: EduPonz <eduardoponz@eprosima.com>
Co-authored-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20401: Fix warning

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

* Refs #20401: Fix segfault in Mac tests

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

---------

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
Co-authored-by: Jesús Poderoso <120394830+JesusPoderoso@users.noreply.github.com>
Co-authored-by: JesusPoderoso <jesuspoderoso@eprosima.com>
Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
Co-authored-by: EduPonz <eduardoponz@eprosima.com>
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.

SIGABRT while receiving data on specific HistoryQosPolicy depth setting
5 participants