From Tal Nisan <tnisan(a)redhat.com>:
Tal Nisan has submitted this change and it was merged.
Change subject: restapi: Use ids to calculate intersections
......................................................................
restapi: Use ids to calculate intersections
Currently when the user uses together the 'filter' and 'search'
mechanisms, the server performs two queries: one with filter only, and
one with search only. Then the it calculates and returns the
intersection. But this intersection is calculated assuming that the
objects returned by both queries can be reliably compared using the
'equals' methods. This isn't true, in general. The net result is that
many times the intersection is empty, when it should't. To avoid that
issue this patch changes the server so that it compares the objects by
id, instead of using the 'equals' method.
Change-Id: Id6fd395ca3d3aea7ab2dcdcdf2438e4c487cfc1f
Bug-Url:
https://bugzilla.redhat.com/1402799
Signed-off-by: Juan Hernandez <juan.hernandez(a)redhat.com>
(cherry picked from commit b1040767587db36211115f156f6dd93ef3fcf2de)
(cherry picked from commit 3c85ebf8f5d98639218307848ea19265651841fb)
---
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendCollectionResource.java
1 file changed, 49 insertions(+), 2 deletions(-)
Approvals:
Juan Hernandez: Verified; Looks good to me, approved
Jenkins CI: Passed CI tests
--
To view, visit
https://gerrit.ovirt.org/68904
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id6fd395ca3d3aea7ab2dcdcdf2438e4c487cfc1f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.0
Gerrit-Owner: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>