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

[17464] Improve auto gaps in data sharing #3343

Merged
merged 6 commits into from
Mar 13, 2023
Merged

Conversation

MiguelCompany
Copy link
Member

@MiguelCompany MiguelCompany commented Mar 6, 2023

Description

This PR improves handling of sequence numbers on data sharing readers, and avoids the possibility of an assertion when processing an automatically generated Gap message with a wrong bitmap base.

Opened as draft till we add some regression tests.

@Mergifyio backport 2.9.x 2.8.x 2.6.x 2.1.x
Note: Only the changes to StatefulReader.cpp need to be backported to 2.1.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.
  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

@MiguelCompany MiguelCompany added this to the v2.10.0 milestone Mar 6, 2023
@Mario-DL Mario-DL marked this pull request as ready for review March 9, 2023 15:15
@Mario-DL
Copy link
Member

Mario-DL commented Mar 9, 2023

We can wait for the CI to finish just to ensure that test is passing.

@Mario-DL Mario-DL added the ci-pending PR which CI is running label Mar 9, 2023
@MiguelCompany
Copy link
Member Author

@richiprosima Please test this

@MiguelCompany MiguelCompany added needs-review PR that is ready to be reviewed and removed ci-pending PR which CI is running labels Mar 10, 2023
@JLBuenoLopez
Copy link
Contributor

The test is not correctly checking the regression. I have cherry-picked b4406ce over master and the test passes without the fixes.

@Mario-DL
Copy link
Member

Double check it from the branch and checking out commit 7fb237de4

Copy link
Contributor

@JLBuenoLopez JLBuenoLopez left a comment

Choose a reason for hiding this comment

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

LGTM!

I have run a manual CI run to check that the regression test fails in master.

@JLBuenoLopez JLBuenoLopez added ready-to-merge Ready to be merged. CI and changes have been reviewed and approved. and removed needs-review PR that is ready to be reviewed labels Mar 13, 2023
@MiguelCompany MiguelCompany merged commit 2674fdd into master Mar 13, 2023
@MiguelCompany MiguelCompany deleted the hotfix/17464 branch March 13, 2023 10:43
@MiguelCompany
Copy link
Member Author

@Mergifyio backport 2.9.x 2.8.x 2.6.x 2.1.x

@mergify
Copy link
Contributor

mergify bot commented Mar 13, 2023

backport 2.9.x 2.8.x 2.6.x 2.1.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Mar 13, 2023
* Refs #17464. Avoid substraction on StatefulReader::processGapMsg

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Ensure sequence consistence on DataSharing ReaderPool.

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Improve sequence number checks on DataSharingListener.

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Additional sanity checks on StatefulReader::processGapMsg

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464: Added RTPSBlackBoxTest for GAP processing

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

* Refs #17464: Linter

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

---------

Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Mario Dominguez <[email protected]>
Co-authored-by: Mario Dominguez <[email protected]>
(cherry picked from commit 2674fdd)

# Conflicts:
#	test/blackbox/common/RTPSBlackboxTestsBasic.cpp
mergify bot pushed a commit that referenced this pull request Mar 13, 2023
* Refs #17464. Avoid substraction on StatefulReader::processGapMsg

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Ensure sequence consistence on DataSharing ReaderPool.

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Improve sequence number checks on DataSharingListener.

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Additional sanity checks on StatefulReader::processGapMsg

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464: Added RTPSBlackBoxTest for GAP processing

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

* Refs #17464: Linter

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

---------

Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Mario Dominguez <[email protected]>
Co-authored-by: Mario Dominguez <[email protected]>
(cherry picked from commit 2674fdd)

# Conflicts:
#	test/blackbox/common/RTPSBlackboxTestsBasic.cpp
mergify bot pushed a commit that referenced this pull request Mar 13, 2023
* Refs #17464. Avoid substraction on StatefulReader::processGapMsg

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Ensure sequence consistence on DataSharing ReaderPool.

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Improve sequence number checks on DataSharingListener.

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Additional sanity checks on StatefulReader::processGapMsg

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464: Added RTPSBlackBoxTest for GAP processing

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

* Refs #17464: Linter

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

---------

Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Mario Dominguez <[email protected]>
Co-authored-by: Mario Dominguez <[email protected]>
(cherry picked from commit 2674fdd)

# Conflicts:
#	test/blackbox/common/RTPSBlackboxTestsBasic.cpp
mergify bot pushed a commit that referenced this pull request Mar 13, 2023
* Refs #17464. Avoid substraction on StatefulReader::processGapMsg

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Ensure sequence consistence on DataSharing ReaderPool.

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Improve sequence number checks on DataSharingListener.

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Additional sanity checks on StatefulReader::processGapMsg

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464: Added RTPSBlackBoxTest for GAP processing

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

* Refs #17464: Linter

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

---------

Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Mario Dominguez <[email protected]>
Co-authored-by: Mario Dominguez <[email protected]>
(cherry picked from commit 2674fdd)

# Conflicts:
#	src/cpp/rtps/DataSharing/DataSharingListener.cpp
#	src/cpp/rtps/DataSharing/ReaderPool.hpp
#	test/blackbox/common/RTPSBlackboxTestsBasic.cpp
#	test/blackbox/common/RTPSWithRegistrationReader.hpp
MiguelCompany added a commit that referenced this pull request Mar 22, 2023
* Improve auto gaps in data sharing (#3343)

* Refs #17464. Avoid substraction on StatefulReader::processGapMsg

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Ensure sequence consistence on DataSharing ReaderPool.

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Improve sequence number checks on DataSharingListener.

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Additional sanity checks on StatefulReader::processGapMsg

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464: Added RTPSBlackBoxTest for GAP processing

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

* Refs #17464: Linter

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

---------

Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Mario Dominguez <[email protected]>
Co-authored-by: Mario Dominguez <[email protected]>
(cherry picked from commit 2674fdd)

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

* Fix conflicts

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: Miguel Company <[email protected]>
Co-authored-by: Miguel Company <[email protected]>
MiguelCompany added a commit that referenced this pull request Mar 22, 2023
* Improve auto gaps in data sharing (#3343)

* Refs #17464. Avoid substraction on StatefulReader::processGapMsg

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Ensure sequence consistence on DataSharing ReaderPool.

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Improve sequence number checks on DataSharingListener.

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Additional sanity checks on StatefulReader::processGapMsg

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464: Added RTPSBlackBoxTest for GAP processing

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

* Refs #17464: Linter

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

---------

Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Mario Dominguez <[email protected]>
Co-authored-by: Mario Dominguez <[email protected]>
(cherry picked from commit 2674fdd)

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

* Fix conflicts

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: Miguel Company <[email protected]>
Co-authored-by: Miguel Company <[email protected]>
MiguelCompany added a commit that referenced this pull request Mar 22, 2023
* Improve auto gaps in data sharing (#3343)

* Refs #17464. Avoid substraction on StatefulReader::processGapMsg

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Ensure sequence consistence on DataSharing ReaderPool.

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Improve sequence number checks on DataSharingListener.

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Additional sanity checks on StatefulReader::processGapMsg

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464: Added RTPSBlackBoxTest for GAP processing

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

* Refs #17464: Linter

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

---------

Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Mario Dominguez <[email protected]>
Co-authored-by: Mario Dominguez <[email protected]>
(cherry picked from commit 2674fdd)

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

* Fix conflicts

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: Miguel Company <[email protected]>
Co-authored-by: Miguel Company <[email protected]>
EduPonz pushed a commit that referenced this pull request May 12, 2023
* Improve auto gaps in data sharing (#3343)

* Refs #17464. Avoid substraction on StatefulReader::processGapMsg

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Ensure sequence consistence on DataSharing ReaderPool.

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Improve sequence number checks on DataSharingListener.

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Additional sanity checks on StatefulReader::processGapMsg

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464: Added RTPSBlackBoxTest for GAP processing

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

* Refs #17464: Linter

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

---------

Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Mario Dominguez <[email protected]>
Co-authored-by: Mario Dominguez <[email protected]>
(cherry picked from commit 2674fdd)

# Conflicts:
#	src/cpp/rtps/DataSharing/DataSharingListener.cpp
#	src/cpp/rtps/DataSharing/ReaderPool.hpp
#	test/blackbox/common/RTPSBlackboxTestsBasic.cpp
#	test/blackbox/common/RTPSWithRegistrationReader.hpp

* Refs #17464. Removed changes on DataSharing.

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Fix conflicts.

Signed-off-by: Miguel Company <[email protected]>

* Refs #17464. Fixed tests

Signed-off-by: Javier Santiago <[email protected]>

---------

Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Javier Santiago <[email protected]>
Co-authored-by: Miguel Company <[email protected]>
Co-authored-by: Javier Santiago <[email protected]>
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