[openstack-dev] [ ceilometer] The Pagination patches
jaypipes at gmail.com
Sun Jan 12 21:09:38 UTC 2014
On Fri, 2014-01-10 at 03:31 +0000, Gao, Fengqian wrote:
> Since we still have no new conclusion for pagination for now, shall we
> still go on with the current pagination solution?
> Please help to review patches:
Please see my review on the first of the above patches. You need to
ensure that there is at least one unique column in the sort keys if
pagination is used.
There is a similar issue in the second patch (reviewing it now) that
uses the sqlalchemy_utils (oslo.db) paginate_query() method...
The sqlalchemy_utils.paginate_query() method **requires** that sort_keys
contains a unique column . The docstring for that method says:
"Pagination works by requiring a unique sort_key, specified by
sort_keys. (If sort_keys is not unique, then we risk looping through
So, care must be taken to pass sort_keys parameter to paginate_query()
that already contains at least one unique column in the sort keys.
More information about the OpenStack-dev