Change in ovirt-engine[ovirt-engine-4.1]: restapi: Use ids to calculate intersections

From Tal Nisan <tnisan@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@redhat.com> (cherry picked from commit b1040767587db36211115f156f6dd93ef3fcf2de) --- 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/68775 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id6fd395ca3d3aea7ab2dcdcdf2438e4c487cfc1f Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-4.1 Gerrit-Owner: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Tal Nisan <tnisan@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>
participants (1)
-
Code Review