share list detail slow database access

Bug #1859785 reported by Maurice Escher
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Maurice Escher

Bug Description

Hi,

shares have a lot of relations and thus a listing of share details results in a lot database queries. Looking at the sqlalchemy models there is room for improvement.

I will send a suggested fix.

Best,
Maurice

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.opendev.org/702639

Changed in manila:
assignee: nobody → Maurice Escher (maurice-escher)
status: New → In Progress
Tom Barron (tpb)
Changed in manila:
milestone: none → ussuri-2
importance: Undecided → Medium
tags: added: db
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.opendev.org/702639
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=54c5667e6b4a37270c4aed64b9a5ebd5f31bfa16
Submitter: Zuul
Branch: master

commit 54c5667e6b4a37270c4aed64b9a5ebd5f31bfa16
Author: Sebastian Lohff <email address hidden>
Date: Wed Jun 19 16:21:19 2019 +0200

    Improve share list speed using lazy='subquery'

    lazy='immediate' leads to each relationship being collected when
    it is accessed. This results in at least three extra queries when
    we query for all share details. lazy='subquery' collects all data
    when the query is executed. In this commit we only changed code for
    improving the share list with details ("manila list") speed.

    Change-Id: Ia61b108ece0817069737980a614cc6c15c1a3507
    Closes-Bug: #1859785
    Co-authored-by: Johannes Kulik <email address hidden>
    Co-authored-by: Maurice Escher <email address hidden>

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/704850

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/train)

Reviewed: https://review.opendev.org/704850
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=f01e48557863a4b6d4e75fe368e0185652aab09f
Submitter: Zuul
Branch: stable/train

commit f01e48557863a4b6d4e75fe368e0185652aab09f
Author: Sebastian Lohff <email address hidden>
Date: Wed Jun 19 16:21:19 2019 +0200

    Improve share list speed using lazy='subquery'

    lazy='immediate' leads to each relationship being collected when
    it is accessed. This results in at least three extra queries when
    we query for all share details. lazy='subquery' collects all data
    when the query is executed. In this commit we only changed code for
    improving the share list with details ("manila list") speed.

    Change-Id: Ia61b108ece0817069737980a614cc6c15c1a3507
    Closes-Bug: #1859785
    Co-authored-by: Johannes Kulik <email address hidden>
    Co-authored-by: Maurice Escher <email address hidden>
    (cherry picked from commit 54c5667e6b4a37270c4aed64b9a5ebd5f31bfa16)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/704897

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/stein)

Reviewed: https://review.opendev.org/704897
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=dd35b08de1c2b5c9af835579ed5a07e527fa8a65
Submitter: Zuul
Branch: stable/stein

commit dd35b08de1c2b5c9af835579ed5a07e527fa8a65
Author: Sebastian Lohff <email address hidden>
Date: Wed Jun 19 16:21:19 2019 +0200

    Improve share list speed using lazy='subquery'

    lazy='immediate' leads to each relationship being collected when
    it is accessed. This results in at least three extra queries when
    we query for all share details. lazy='subquery' collects all data
    when the query is executed. In this commit we only changed code for
    improving the share list with details ("manila list") speed.

    Change-Id: Ia61b108ece0817069737980a614cc6c15c1a3507
    Closes-Bug: #1859785
    Co-authored-by: Johannes Kulik <email address hidden>
    Co-authored-by: Maurice Escher <email address hidden>
    (cherry picked from commit 54c5667e6b4a37270c4aed64b9a5ebd5f31bfa16)
    (cherry picked from commit f01e48557863a4b6d4e75fe368e0185652aab09f)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 9.1.1

This issue was fixed in the openstack/manila 9.1.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 8.1.1

This issue was fixed in the openstack/manila 8.1.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.