[openstack-dev] [Panko] Ways to go through events in the order they appear in database

Mikhail Kebich mikhail.kebich at gmail.com
Wed Aug 30 15:00:39 UTC 2017


On Wed, Aug 30, 2017 at 4:22 PM, gordon chung <gord at live.ca> wrote:
> ah, i see. iirc, we can choose what we sort on. can this be solved by
> just passing in a different sort key? or maybe we need to support
> returning results without sort.

I thought about this. The key issue I see here is that the api does
not include "id" sort key to the result. Because of this api clients
can't specify a value of marker that points to the next batch of
events. And I believe we should think carefully about exposing this
filed because it may be meaningless depending on a storage back-end.

Actually, cursors are intended to solve this issue by specifying a
value of marker explicitly without making an assumption what marker
is.

I attached a prototype. It is based on stable/ocata branch. I did not
replace existing pagination and just provided another URL route to use
cursors. But, I think it is possible to replace current pagination
logic with cursors, because if a storage back-end understands markers
it can specify the value explicitly.

Thanks,
Mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cursor_api.zip
Type: application/zip
Size: 3991 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170830/4ffebda6/attachment.zip>


More information about the OpenStack-dev mailing list