api: page_reverse does not work if limit passed

Bug #1583289 reported by Ihar Hrachyshka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Invalid
Medium
Ihar Hrachyshka

Bug Description

In API, if page_reverse is passed with limit, then the result is not in reversed order. This is because common_db_mixin mistakenly apply .reverse() on the result from database, breaking the order as returned from database backend.

Tags: api
Changed in neutron:
assignee: nobody → Ihar Hrachyshka (ihar-hrachyshka)
status: New → In Progress
Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :
tags: added: api
Changed in neutron:
importance: Undecided → Medium
Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

This bug is relevant for oslo.versionedobjects effort since it blocks some API tests planned to be used to catch regressions when switching resources like subnet or network to objects. Targeting to N-1.

Changed in neutron:
milestone: none → newton-1
Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

Turned our that there is no bug: page_reverse just implies behaviour that is different from what I expected: it merely changes the order in which the page is read (so with a marker, it will return the previous page before the marker in db order; it is not supposed to reverse the page result itself).

Changed in neutron:
status: In Progress → Invalid
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.