Change in ovirt-engine[master]: core: fix search of SDs when filtered by host

Allon Mureinik has submitted this change and it was merged. Change subject: core: fix search of SDs when filtered by host ...................................................................... core: fix search of SDs when filtered by host Following change-id: I862873171c6753f8c8863c10c336e981e39dc8cb, searching storage domains by an host looks like [1]. I.e. the left outer join is being made on the storage_pool_id; which leads to multiple records of the same storage domain (since a data-center can contain multiple hosts). Therefore, reverted to previous search so it looks like [2]. I.e. the join is being made on the storage domain id, hence, ensuring a distinct result set. Similarly, it is mandatory to revert the opposite search (hosts by storage domain) to use 'vds_with_tags' view again. Fixed relevant tests in SyntaxCheckerTest. [1] SELECT storage_domains_for_search.* FROM storage_domains_for_search LEFT OUTER JOIN vds_with_tags ON storage_domains_for_search.storage_pool_id=vds_with_tags.storage_pool_id WHERE vds_with_tags.vds_name ILIKE 'host1') ORDER BY storage_name ASC [2] SELECT storage_domains_for_search.* FROM storage_domains_for_search LEFT OUTER JOIN vds_with_tags ON storage_domains_for_search.id=vds_with_tags.storage_id WHERE vds_with_tags.vds_name ILIKE 'host1') ORDER BY storage_name ASC Change-Id: I04e37501b29a17a634e31e8875d63577e5f9f401 Bug-Url: https://bugzilla.redhat.com/1113891 Signed-off-by: Daniel Erez <derez@redhat.com> --- M backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/SearchObjectAutoCompleter.java M backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/SyntaxContainer.java M backend/manager/modules/searchbackend/src/test/java/org/ovirt/engine/core/searchbackend/SyntaxCheckerTest.java 3 files changed, 6 insertions(+), 6 deletions(-) Approvals: Daniel Erez: Verified Allon Mureinik: Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/29365 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I04e37501b29a17a634e31e8875d63577e5f9f401 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Daniel Erez <derez@redhat.com> Gerrit-Reviewer: Allon Mureinik <amureini@redhat.com> Gerrit-Reviewer: Daniel Erez <derez@redhat.com> Gerrit-Reviewer: Liran Zelkha <lzelkha@redhat.com> Gerrit-Reviewer: automation@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server
participants (1)
-
amureini@redhat.com