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

[PR #2851/52a9accc backport][3.17] Fixed concurrent-ks-tree-syncs by making disttree ID repo-specific. #2860

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Nov 7, 2022

This is a backport of PR #2851 as merged into main (52a9acc).

DistributionTree digest and subrepo-names now both end with the pulp-id of the "owning" Repository, making them unique to that repo and therefore protected from concurrent-updates against anything that is changing that Repository.

Addon/Variant/Image are transitively made unique by virtue of having their DistributionTree be part of their unique-together.

Sub-repo content (e.g. Packages et al) are de-duplicated via their existing uniqueness constraints.

The end result is a minor increase in Content objects (i.e., DistTrees/Addons/Images/Variants that used to have only one instance are now one-per-containing-repo), and a small impact on subrepo-syncing (since previously-unique subrepos will now have a first-sync that would have been skipped). Content will continue to only be sync'd once.

fixes #2278.
fixes #2775.
closes #2304.
[nocoverage]

DistributionTree digest and subrepo-names now both end with the
pulp-id of the "owning" Repository, making them unique to that
repo and therefore protected from concurrent-updates against
anything that is changing that Repository.

Addon/Variant/Image are transitively made unique by virtue of
having their DistributionTree be part of their unique-together.

Sub-repo **content** (e.g. Packages et al) are de-duplicated via
their existing uniqueness constraints.

The end result is a minor increase in Content objects (i.e.,
DistTrees/Addons/Images/Variants that used to have only one
instance are now one-per-containing-repo), and a small impact
on subrepo-syncing (since previously-unique subrepos will now
have a first-sync that would have been skipped). Content will
continue to only be sync'd once.

fixes #2278.
[nocoverage]

(cherry picked from commit 52a9acc)
@ggainey
Copy link
Contributor

ggainey commented Nov 15, 2022

The failures here are due to the DistributionTree-naming-fix colliding with the use of limited-width CharFields (instead of TextFields) in 3.17. We currently don't have an active request to release a 3.17.z with this fix, so I'm going to close this PR.

Note that if we do decide to fix 3.17, we could wrap the naming-trick we're doing here in an extra sha256() to get a result that will fit into the more-narrowly-defined field.

@ggainey ggainey closed this Nov 15, 2022
@dralley dralley deleted the patchback/backports/3.17/52a9accc79e49991a8941622b60485e1845d23a2/pr-2851 branch November 29, 2022 21:34
@ggainey
Copy link
Contributor

ggainey commented May 16, 2023

Being backported in #3154

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.

1 participant