Fix user & database pagination in guests
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.
Fix proposed to branch: master /review. openstack. org/329208
Review: https:/