eProsima / Fast-DDS

The most complete DDS - Proven: Plenty of success cases. Looking for commercial support? Contact info@eprosima.com
https://eprosima.com
Apache License 2.0
2.16k stars 765 forks source link

[21121] IPayloadPool refactor #4892

Closed cferreiragonz closed 3 months ago

cferreiragonz commented 4 months ago

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

Reviewer Checklist

cferreiragonz commented 4 months ago

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.

MiguelCompany commented 3 months ago

@cferreiragonz I have rebased this on top of #4875. When it gets merged, please re-rebase and update versions.md on this PR.

MiguelCompany commented 3 months ago

@richiprosima Please test_3 discovery-server

MiguelCompany commented 3 months ago

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

MiguelCompany commented 3 months ago

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

MiguelCompany commented 3 months ago

@richiprosima Please test_3 discovery-server with updated ci branch

MiguelCompany commented 3 months ago

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