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

1399768: Make pool exported count calculation lazy #1402

Merged

Conversation

barnabycourt
Copy link
Contributor

@barnabycourt barnabycourt commented Nov 29, 2016

Loading entitlements forces a pool load. Because this is done with a left join on pool which triggers the exported calculation an extraordinary amount of time is spent in the entitlement fetch (500ms for medium/large database). Under large amounts of load this is having a cascading effect of slowing down everything.

The risk with this is that areas of code that rely on the exported count will trigger additional calls to the databse. Where pools are acted on in bulk there is additional risk (manifest import specifically).

@barnabycourt barnabycourt changed the title Make pool exported count calculation lazy 1399768: Make pool exported count calculation lazy Nov 29, 2016
@mstead mstead self-assigned this Nov 29, 2016
@mstead mstead added the bug label Nov 29, 2016
@mstead mstead merged commit ecaa1fb into candlepin:candlepin-0.9.54-HOTFIX Nov 29, 2016
@barnabycourt barnabycourt deleted the pool_exported branch November 29, 2016 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants