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

Fix partition copy in QoS [11451] #1947

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

jay-sridharan
Copy link
Contributor

This PR fixes a bug where a QoS is copied from one ReaderProxyData to another but partition names are not copied if the list is empty.

Specifically, this code path:

/// src/cpp/rtps/builtin/discovery/participant/PDP.cpp   

         else
            {
                // Pool is not empty, use entry from pool
                ret_val = reader_proxies_pool_.back();
                reader_proxies_pool_.pop_back();
            }

            // Add to ParticipantProxyData
            (*pit->m_readers)[reader_guid.entityId] = ret_val;

@jay-sridharan
Copy link
Contributor Author

jay-sridharan commented May 3, 2021

@MiguelCompany

Hi Miguel,

I'm pretty new to this project, so please forgive the newbie questions. Do I need to assign reviewers to this somehow, or does that happen automatically? And should I worry about the CI failures? Seems like quite a few other PRs have failed CI as well.

Thanks for the great project!

@MiguelCompany
Copy link
Member

@jay-sridharan First of all, thank you for your contribution. The process is that someone at eProsima reviews PRs, we will do it with yours soon. The CI failures seem unrelated to your changes, but checking them is also part of the review process.

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.

The changes look good to me, but it would be great to have a regression test in place.
Would you mind adding one?

Also, while trying to find the root cause of the issue I've also found that these lines need a pit.second->clear() before the corresponding push_back

@MiguelCompany MiguelCompany changed the title Fix partition copy in QoS Fix partition copy in QoS [11451] May 4, 2021
@jay-sridharan
Copy link
Contributor Author

jay-sridharan commented May 4, 2021

Thanks for the review! I'll look into adding a regression test. Any thoughts off the top of your head as to the best way to do that?

Probably set the resource limit to a single reader instance to limit the size of the pool, and then re-construct one and make sure the QoS was copied correctly? Perhaps there is an easier way

@EduPonz EduPonz added the to-do label Jun 1, 2022
@JLBuenoLopez JLBuenoLopez added this to the v2.10.1 milestone Mar 16, 2023
@EduPonz EduPonz modified the milestones: v2.10.1, v2.10.2 Mar 31, 2023
@JLBuenoLopez JLBuenoLopez modified the milestones: v2.10.2, v2.11.0 Jun 12, 2023
Signed-off-by: Jay Sridharan <[email protected]>
@JLBuenoLopez
Copy link
Contributor

I have rebased and apply the review suggestion. Part of the changes suggested in this PR were already introduced in #2108. I have followed the same approach in the publisher's side.

@JLBuenoLopez
Copy link
Contributor

@richiprosima please test this

@JLBuenoLopez JLBuenoLopez added ci-pending PR which CI is running needs-review PR that is ready to be reviewed and removed ci-pending PR which CI is running labels Jun 20, 2023
@EduPonz EduPonz removed the needs-review PR that is ready to be reviewed label Jun 21, 2023
@EduPonz EduPonz dismissed MiguelCompany’s stale review June 21, 2023 06:39

Approved by EduPonz

@EduPonz EduPonz merged commit 7bcbfa3 into eProsima:master Jun 21, 2023
6 checks passed
@JLBuenoLopez
Copy link
Contributor

@Mergifyio backport 2.10.x 2.9.x 2.6.x

@mergify
Copy link
Contributor

mergify bot commented Jun 21, 2023

backport 2.10.x 2.9.x 2.6.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jun 21, 2023
Signed-off-by: Jay Sridharan <[email protected]>
Co-authored-by: Jay Sridharan <[email protected]>
(cherry picked from commit 7bcbfa3)
mergify bot pushed a commit that referenced this pull request Jun 21, 2023
Signed-off-by: Jay Sridharan <[email protected]>
Co-authored-by: Jay Sridharan <[email protected]>
(cherry picked from commit 7bcbfa3)
mergify bot pushed a commit that referenced this pull request Jun 21, 2023
Signed-off-by: Jay Sridharan <[email protected]>
Co-authored-by: Jay Sridharan <[email protected]>
(cherry picked from commit 7bcbfa3)
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.

4 participants