[Openstack] Getting pagination right

Jay Pipes jaypipes at gmail.com
Wed May 25 19:57:58 UTC 2011


On Wed, May 25, 2011 at 3:43 PM, Greg Holt <gholt at rackspace.com> wrote:
> Okay, I give up then. Not sure what's different with what you have vs. Swift dbs. Just trying to offer up what we do and have been doing for a while now.

The pagination in Swift is not consistent. Inserts into the Swift
databases in between the time of the initial query and the requesting
the "next page" can result in rows from the original first page
getting on the new second page.

Code in swift/common/db.py lines 958 through 974 shows an ORDER BY
name. Newly inserted objects (or records that are deleted) with a name
value > marker and < end_marker can result in a page changing its
contents on refresh. This is why I was saying it's not a consistent
view of the data.

-jay




More information about the Openstack mailing list