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

optimization for x-repo search index builds #1466

Merged
merged 2 commits into from May 25, 2023

Conversation

jctanner
Copy link
Contributor

@jctanner jctanner commented May 19, 2023

https://issues.redhat.com/browse/AAH-2337
https://issues.redhat.com/browse/AAH-2351
#1467

In the previous iteration of this code, ALL collection indexes would be rebuilt if at least one of their CVs were still in the repository version. This patch uses the .added and .removed functions to make a set of namespace(s).name(s) which have changed in the newest repository version. This set of namespace(s).names(s) can then be used to skip rebuilding the index for a collection which hasn't changed in some way.

Without the patch:
image

With the patch:
image

@jctanner jctanner force-pushed the OPTIMIZE_SEARCH_INDEXING_2023_05_18 branch from 98b99da to 8f82ed4 Compare May 22, 2023 01:05
@jctanner jctanner requested a review from gerrod3 May 22, 2023 01:10
@jctanner jctanner force-pushed the OPTIMIZE_SEARCH_INDEXING_2023_05_18 branch from 8f82ed4 to 4d3eab0 Compare May 22, 2023 13:40
… version.

fixes pulp#1467

Signed-off-by: James Tanner <tanner.jc@gmail.com>
@jctanner jctanner force-pushed the OPTIMIZE_SEARCH_INDEXING_2023_05_18 branch from 4d3eab0 to fc590ea Compare May 22, 2023 13:44
@jctanner jctanner changed the title Prototype optimization for x-repo search index builds optimization for x-repo search index builds May 22, 2023
@jctanner jctanner requested a review from mdellweg May 22, 2023 22:32
Copy link
Member

@mdellweg mdellweg left a comment

Choose a reason for hiding this comment

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

Some comments/questions, but nothing really blocking.

pulp_ansible/app/tasks/collectionversion_index.py Outdated Show resolved Hide resolved
pulp_ansible/app/tasks/collectionversion_index.py Outdated Show resolved Hide resolved
pulp_ansible/app/tasks/collectionversion_index.py Outdated Show resolved Hide resolved
pulp_ansible/app/tasks/collectionversion_index.py Outdated Show resolved Hide resolved
Comment on lines +51 to +52
if previous_version is None:
return None
Copy link
Member

Choose a reason for hiding this comment

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

Does this mean with retain_repo_versions = 1 there is no optimization?

fixes pulp#1467

Signed-off-by: James Tanner <tanner.jc@gmail.com>
@jctanner jctanner force-pushed the OPTIMIZE_SEARCH_INDEXING_2023_05_18 branch from 0bb05e2 to 31d0a78 Compare May 25, 2023 14:27
@gerrod3 gerrod3 merged commit f6c9d1e into pulp:main May 25, 2023
14 checks passed
@patchback
Copy link

patchback bot commented May 25, 2023

Backport to 0.17: 💚 backport PR created

✅ Backport PR branch: patchback/backports/0.17/f6c9d1e7195443c61a70c64db7b5e2a7c5de033d/pr-1466

Backported as #1469

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request May 25, 2023
* Bypass re-indexing collections which have not changed in the new repo version.

fixes #1467

Signed-off-by: James Tanner <tanner.jc@gmail.com>
(cherry picked from commit f6c9d1e)
gerrod3 pushed a commit that referenced this pull request May 25, 2023
* Bypass re-indexing collections which have not changed in the new repo version.

fixes #1467

Signed-off-by: James Tanner <tanner.jc@gmail.com>
(cherry picked from commit f6c9d1e)

Co-authored-by: jctanner <tanner.jc@gmail.com>
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.

None yet

3 participants