Fix race in Postgres user-list

Bug #1617464 reported by Petr Malik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Medium
Petr Malik

Bug Description

Certain postgresql operations take quite some time.
The current implementation of user-list suffers
from a race condition (manifested on the gate).

The list is constructed by first retrieving
all user names from the database and then querying
again for access rights of each of them.

Apart from being inefficient (need to query for every user)
if a change (say, rename) occurs in between, the code subsequently
attempts to retrieve permissions on a non-existing username and
fails.

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

Fix proposed to branch: master
Review: https://review.openstack.org/361477

Changed in trove:
status: New → In Progress
Amrith Kumar (amrith)
Changed in trove:
milestone: none → newton-1
Changed in trove:
assignee: Petr Malik (pmalik) → Amrith (amrith)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/361477
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=5c4b71000030c97c309167bc54445279e0224121
Submitter: Jenkins
Branch: master

commit 5c4b71000030c97c309167bc54445279e0224121
Author: Petr Malik <email address hidden>
Date: Fri Aug 26 17:19:54 2016 -0400

    Fix race in Postgres user-list

    Retrieve the user names and access rights
    in a single query hence closing the race
    window.

    Change-Id: I66847827fa8cb0615c1662670017d2cc55466ff3
    Closes-Bug: 1617464

Changed in trove:
status: In Progress → Fix Released
Amrith Kumar (amrith)
Changed in trove:
assignee: Amrith (amrith) → Petr Malik (pmalik)
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.