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

Ensure recursive add and remove is not impacted by values_list() #460

Open
pulpbot opened this issue Dec 15, 2021 · 1 comment
Open

Ensure recursive add and remove is not impacted by values_list() #460

pulpbot opened this issue Dec 15, 2021 · 1 comment
Labels

Comments

@pulpbot
Copy link
Member

pulpbot commented Dec 15, 2021

Author: @ipanova (ipanova@redhat.com)

Redmine Issue: 5823, https://pulp.plan.io/issues/5823


Django docs calls out that values_list() should not be used for many-to-many relationships, because the qs might give inaccurate results.

Look into recursive add and remove code and ensure our results are not influnced by usage of values_list()

pulp/pulp_rpm#1524 (comment)

@lubosmj
Copy link
Member

lubosmj commented Jul 13, 2022

The recursive_add and recursive_remove code should be refactored because we build queries on multiple manifests/manifest lists at the same time.

As per the https://stackoverflow.com/a/54752636/3907906 discussion, once you call filter(field__ref_field) and then values(), a created JOIN clause may affect the adjacent query when dealing with a many-to-many relationship.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Not Started
Development

No branches or pull requests

3 participants