Bug 966665
Summary: | Criteria queries with paging and sorting on non unique fields may return same item on different pages | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Heiko W. Rupp <hrupp> |
Component: | REST, CLI, Core Server, Core UI | Assignee: | Jay Shaughnessy <jshaughn> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 4.7 | CC: | jshaughn, lzoubek |
Target Milestone: | --- | ||
Target Release: | RHQ 4.8 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | 966559 | Environment: | |
Last Closed: | 2013-08-31 10:15:19 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: | |||
Bug Depends On: | 966559 | ||
Bug Blocks: | 958772 |
Description
Heiko W. Rupp
2013-05-23 16:00:27 UTC
master commit 471b8a20f984f79d448acf58c01ec8c38cee8e67 Author: Jay Shaughnessy <jshaughn> Date: Fri May 24 19:45:41 2013 -0400 All paged criteria queries now apply ID as the least significant ordering field (see exceptions below). Since ID is unique, this ensures that queries for pages always return the same ordering of rows. ID will not be automatically appended as an ordering field if: - the paging is unlimited (i.e. no pagesize, all rows returned) - the Criteria class does not support an ID sort - the caller has set the Criteria class instance to not support the ID sort - ID is already specified as an ordering field - the max number of ordering fields has already been set (3) Note that CriteriaQuery has had its support for implicit ID sorting removed, as the new mechanism, which moves support to the CriteriaQueryGenerator, replaces it. My original case has been solved by this. I have removed the sortById from org.rhq.enterprise.server.rest.ResourceHandlerBean#getResourcesByQuery and the org.rhq.modules.integrationTests.restApi.ResourcesTest#testGetResourcesWithPagingAndUniquenessCheck works now as expected, Bulk close of old bugs in VERIFIED state. |