Actions
Issue #3893
closedpulp.server.maintenance.monthly fails if applicability collection is too large
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.17.1
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 41
Quarter:
Description
Jul 31 16:04:24 pulp: celery.worker.job:INFO: Task pulp.server.maintenance.monthly.queue_monthly_maintenance[d00b6ddf-6f3a-42dc-8b72-690513c7ce5a] succeeded in 0.293885109015s: None
Jul 31 16:04:29 pulp: celery.worker.job:ERROR: (28015-45440) Task pulp.server.maintenance.monthly.monthly_maintenance[8de6e9ec-b998-4581-acf8-29d3810c0f3f] raised unexpected:
OperationFailure(u"command SON ([('distinct', u'repo_profile_applicability'), ('key', 'profile_hash')]) on namespace pulp_database.$cmd failed: exception: distinct too big, 16mb cap",)Jul 31 16:04:29 chlp2550341a pulp: celery.worker.job:ERROR: (28015-45440) File "/usr/lib/python2.7/site-packages/pulp/server/maintenance/monthly.py", line 22, in monthly_maintenance
Actions
Use aggregation pipeline to avoid BSON 16MB size limit
Results are written into a separate collection which is reused every time the cleanup is run. If there are millions of orphaned applicability profiles, it's easy to exceed 16MB.
closes #3893 https://pulp.plan.io/issues/3893