Importing manifest gets slow with increasing number of organizations
Description of problem:
It looks like candlepin polls every org and every activation key every time a manifest is being uploaded.
this is the section where my manifest has been uploaded to Default Organization, which was the only org on the system:
here I created a new organization my_org_1 and did the same thing:
(notice, there is polling to Default Organization done too).
I've also extracted the CI machine's candlepin log around the manifest import phase:
This took about 11 minutes
I realize 1000+ is a bit extreme and is not likely to be used in a production, however this causes many timeout issues to our automation. Also it is good to demonstrate the increasing time needed to process the manifest.
Also it looks like even a few organizations with many Activation Keys might cause the issue.
Version-Release number of selected component (if applicable):
6.2.0 beta (GA12.1)
Steps to Reproduce:
1. get multiple organizations, optionally with many activation keys
2. try to upload the manifest
3. experiment by adding more organizations and activation keys
The time taken to import a manifest should be constant and shouldn't exceed 1 minute (subjective)
Fixes #20233 - speed up manifest actions
by only importing subscriptions from the org
performing the action