-
Notifications
You must be signed in to change notification settings - Fork 53
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
Performance fix for collection version list. #1430
Conversation
Test failure is due to a caching lookup bug in ansible-core==2.13.9. We'll be waiting on a fix and a release for that before we can move this forward. |
pulp_ansible/app/galaxy/v3/views.py
Outdated
@@ -858,14 +858,40 @@ def get_list_serializer(self, *args, **kwargs): | |||
kwargs.setdefault("context", self.get_serializer_context) | |||
return self.list_serializer_class(*args, **kwargs) | |||
|
|||
def get_list_queryset(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this also beneficial for the detail view? We could just overwrite get_queryset
at that point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not actually sure, but I can see if it breaks any tests.
Collection deletion tests are causing tracebacks when get_queryset is overridden ...
|
# prevent OOMKILL ... | ||
queryset = queryset.only("pk", "content_ptr_id") | ||
|
||
queryset = self.filter_queryset(queryset) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is unclear to me why filter_queryset
may already OOM, because it should really only apply filters to the queryset, not evaluate it. And I don't see anything obvious in either inherited filter_queryset
nor the CollectionVersionFilter
class. Does the paginated version OOM too? Then I would suspect this fix will just by us some time until these two fields are able to fill the memory again. Approving anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add some of these thought to the comment to spark further investigation.
fixes: pulp#1433 Signed-off-by: James Tanner <tanner.jc@gmail.com>
) fixes: pulp#1433 Signed-off-by: James Tanner <tanner.jc@gmail.com>
https://issues.redhat.com/browse/AAH-2229
On a system with community.general's versions all synced, continuous queries against the list endpoint will consume all available memory until the worker is OOMKilled.
Thanks to @rochacbruno for the reproducer: