Bug 994537

Summary: 'lastPage' paging header is wrong
Product: [Other] RHQ Project Reporter: Heiko W. Rupp <hrupp>
Component: RESTAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.8   
Target Milestone: ---   
Target Release: RHQ 4.9   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-26 08:31:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Heiko W. Rupp 2013-08-07 13:12:21 UTC
When you have a number of resources that is a multiple of the page size, then the last page is computed wrong.

Consider 405 resources and a ps of 5, then getting the last page from a previous call to "getbyquery" results in 


{
    "message": "PageList was passed an empty collection but 'totalSize' was 405, PageControl[page=81, size=5, sort[name ASC, id ASC]]"
}


which is logical, as the resources 400-404 are already on page 80 (with page numbering starting at 0)

Comment 1 Heiko W. Rupp 2013-08-08 20:17:09 UTC
master 1ccc454cc27162

Comment 2 Heiko W. Rupp 2014-03-26 08:31:35 UTC
Bulk closing now that 4.10 is out.

If you think an issue is not resolved, please open a new BZ and link to the existing one.