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

Don't load BinaryBlobParts when determining if MiqReportResult is blank #19082

Merged
merged 1 commit into from
Aug 1, 2019

Conversation

skateman
Copy link
Member

When loading Saved Reports with BinaryBlob under Cloud Inter -> Reports, we're loading all the BinaryBlobPart records for each model to determine the status of the Saved Report. If we have a lot of data in one of these blobs (like the BZ below) we end up with a very slow report_data request.

Thanks to @kbrock's we know where the bottleneck is and it can be easily fixed by counting the number of BinaryBlobPart records instead of actually deserializing them. Without this fix on the testing DB the request crashed after 🐢 45 seconds, with the fix it succeeded after ⚡ 262ms.

@miq-bot add_label performance, bug, reporting, ui, hammer/yes, ivanchuk/yes, changelog/yes
@miq-bot add_reviewer @kbrock
@miq-bot add_reviewer @yrudman
@miq-bot add_reviewer @lpichler

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1725142

@skateman skateman force-pushed the report-result-blob-blank branch from 24ce8f4 to 257c561 Compare August 1, 2019 09:46
@miq-bot
Copy link
Member

miq-bot commented Aug 1, 2019

Checked commit skateman@257c561 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🍰

@yrudman
Copy link
Contributor

yrudman commented Aug 1, 2019

👍 looks good, tested changes on client's DB - page loaded almost instantly

@kbrock kbrock merged commit 421d105 into ManageIQ:master Aug 1, 2019
@kbrock kbrock added this to the Sprint 117 Ending Aug 5, 2019 milestone Aug 1, 2019
@kbrock kbrock self-assigned this Aug 1, 2019
simaishi pushed a commit that referenced this pull request Aug 1, 2019
Don't load BinaryBlobParts when determining if MiqReportResult is blank

(cherry picked from commit 421d105)

https://bugzilla.redhat.com/show_bug.cgi?id=1725142
@simaishi
Copy link
Contributor

simaishi commented Aug 1, 2019

Ivanchuk backport details:

$ git log -1
commit 701ab300efb23cdc57ceb0452d3b8035cfa1000f
Author: Keenan Brock <[email protected]>
Date:   Thu Aug 1 15:42:28 2019 -0400

    Merge pull request #19082 from skateman/report-result-blob-blank
    
    Don't load BinaryBlobParts when determining if MiqReportResult is blank
    
    (cherry picked from commit 421d105b6c8b851f315c72608ca89250a5052b4a)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1725142

@skateman skateman deleted the report-result-blob-blank branch August 2, 2019 04:52
simaishi pushed a commit that referenced this pull request Aug 14, 2019
Don't load BinaryBlobParts when determining if MiqReportResult is blank

(cherry picked from commit 421d105)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1737123
@simaishi
Copy link
Contributor

Hammer backport details:

$ git log -1
commit 415ba8afec7b433ff8219bc6cf46edb77a1f6fb4
Author: Keenan Brock <[email protected]>
Date:   Thu Aug 1 15:42:28 2019 -0400

    Merge pull request #19082 from skateman/report-result-blob-blank
    
    Don't load BinaryBlobParts when determining if MiqReportResult is blank
    
    (cherry picked from commit 421d105b6c8b851f315c72608ca89250a5052b4a)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1737123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants