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

[21121] IPayloadPool refactor #4892

Merged
merged 23 commits into from
Jun 12, 2024
Merged

Conversation

cferreiragonz
Copy link
Contributor

@cferreiragonz cferreiragonz commented Jun 4, 2024

Description

This PR adds two main changes:

  1. It moves payload_owner_ from CacheChange_t to SerializedPayload_t
  2. Refactors IPayloadPool class and all derived classes to only manage SerializedPayload_t, instead of CacheChange_t
  3. get_payload() methods refactor
  4. SerializedPayload_t copies are forbidden

In this way, the payload_owner_ is no longer related to a cache change, but to the payload it refers.

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.
  • N/A 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.
  • N/A 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.

@cferreiragonz cferreiragonz added the needs-review PR that is ready to be reviewed label Jun 4, 2024
@cferreiragonz cferreiragonz added this to the v3.0.0 milestone Jun 4, 2024
@cferreiragonz
Copy link
Contributor Author

Since the payload_owner_ now belongs to the SerializedPayload_t, I believe the get_payload() method receiving a source SerializedPayload_t&, an IPayloadPool* and a destination SerializedPayload_t& could be simplified removing the IPayloadPool* parameter, as it is already contained in the source payload. I let the reviewer the decision of keeping it or not.

include/fastdds/rtps/common/CacheChange.h Outdated Show resolved Hide resolved
include/fastdds/rtps/common/SerializedPayload.h Outdated Show resolved Hide resolved
include/fastdds/rtps/common/SerializedPayload.h Outdated Show resolved Hide resolved
include/fastdds/rtps/history/IPayloadPool.h Outdated Show resolved Hide resolved
include/fastdds/rtps/history/IPayloadPool.h Outdated Show resolved Hide resolved
src/cpp/rtps/DataSharing/ReaderPool.hpp Outdated Show resolved Hide resolved
src/cpp/rtps/common/PayloadInfo_t.hpp Outdated Show resolved Hide resolved
include/fastdds/rtps/history/IPayloadPool.h Outdated Show resolved Hide resolved
src/cpp/fastdds/publisher/DataWriterImpl.hpp Outdated Show resolved Hide resolved
src/cpp/fastdds/publisher/DataWriterImpl.hpp Outdated Show resolved Hide resolved
include/fastdds/rtps/common/SerializedPayload.h Outdated Show resolved Hide resolved
src/cpp/fastdds/publisher/DataWriterImpl.cpp Outdated Show resolved Hide resolved
@MiguelCompany MiguelCompany self-requested a review June 6, 2024 14:50
MiguelCompany
MiguelCompany previously approved these changes Jun 6, 2024
Copy link
Member

@MiguelCompany MiguelCompany left a comment

Choose a reason for hiding this comment

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

LGTM with green CI

@MiguelCompany MiguelCompany removed the needs-review PR that is ready to be reviewed label Jun 6, 2024
@cferreiragonz cferreiragonz force-pushed the feature/ipayloadpool_refactor branch from 0928c99 to e023500 Compare June 7, 2024 11:23
@cferreiragonz cferreiragonz requested review from MiguelCompany and removed request for MiguelCompany June 7, 2024 11:23
@elianalf elianalf added the to-do label Jun 10, 2024
@MiguelCompany MiguelCompany added needs-review PR that is ready to be reviewed and removed to-do labels Jun 11, 2024
@MiguelCompany MiguelCompany requested review from MiguelCompany and removed request for MiguelCompany June 11, 2024 06:20
include/fastdds/rtps/common/SerializedPayload.h Outdated Show resolved Hide resolved
include/fastdds/rtps/history/IPayloadPool.h Outdated Show resolved Hide resolved
include/fastdds/rtps/history/IPayloadPool.h Outdated Show resolved Hide resolved
src/cpp/rtps/reader/StatefulReader.cpp Outdated Show resolved Hide resolved
src/cpp/rtps/reader/StatelessReader.cpp Outdated Show resolved Hide resolved
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
@MiguelCompany MiguelCompany self-requested a review June 11, 2024 14:20
@MiguelCompany
Copy link
Member

@richiprosima Please test_3 discovery-server

@cferreiragonz cferreiragonz 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 Jun 12, 2024
@MiguelCompany
Copy link
Member

Checked locally that discovery server tests pass with this and #4932. Ready to merge.

@MiguelCompany
Copy link
Member

@richiprosima Please test_3 discovery-server because #4932 has just been merged

@MiguelCompany
Copy link
Member

@richiprosima Please test_3 discovery-server with updated ci branch

@MiguelCompany
Copy link
Member

@richiprosima Please test_3 discovery-server because I made a mistake in the jenkins job configuration

@MiguelCompany MiguelCompany merged commit 3780507 into master Jun 12, 2024
11 of 12 checks passed
@MiguelCompany MiguelCompany deleted the feature/ipayloadpool_refactor branch June 12, 2024 10:45
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