Fix user & database pagination in guests

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

Bug Description

User and database list pagination done on most of the existing guests is performed incorrectly.
The current implementations produce a list of serialized objects (dicts) and paginates that with the paginate_list function. There are two serious problems with this approach.

The returned marker is supposed to be the 'name' of the last user/database on the page.

 1. A sorted list of dicts cannot be bisected by a string name. The pagination may return wrong (indeterministic) results for any given page.
 2. The returned marker must again be a 'name'. The current implementation returns a serialized object instead.

We need to paginate the objects by 'name' first and then serialize them into a list. The returned marker must be the 'name' of the last object.

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/329208

Changed in trove:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

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

commit f03c0a3058029887975e50018ae7133e3d4e866f
Author: Petr Malik <email address hidden>
Date: Mon Jun 13 18:12:17 2016 -0400

    Fix user & database pagination in guests

    Make sure we serialized paginated objects and not the other way round.
    Ensure the 'next marker' is a string (name).
    Encapsulate the logic in a utility function and add tests.

    Update only guests that have been using the pagination functions.

    Tested with scenario tests on Cassandra and Postgresql.

    Change-Id: I0898270f1afcbe95a431492b1195fb3dd33e9d88
    Closes-Bug: 1592099

Changed in trove:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/trove 6.0.0.0b3

This issue was fixed in the openstack/trove 6.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/trove 6.0.0.0b3 development milestone.

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.