Daniel Erez has uploaded a new change for review. Change subject: core: fixed search Disks when filtered by data-center ......................................................................
core: fixed search Disks when filtered by data-center Similar to fix in chnage-id I04e37501b29a17a634e31e8875d63577e5f9f401 (and following change-id I862873171c6753f8c8863c10c336e981e39dc8cb), searching disks (or clusters) by a data-center looks like [1]. I.e. the left outer join is being made on storage_pool_with_storage_domains; which leads to multiple records since a data-center can contain multiple storage domains. Therefore, reverted to previous search so it uses the 'use-tag' syntax [2]. As a result, a similar issue with search Clusters when filtered by data-center has been fixed as well. [1] SELECT all_disks.* FROM all_disks LEFT OUTER JOIN storage_pool_with_storage_domain ON all_disks.storage_pool_id=storage_pool_with_storage_domain.id WHERE storage_pool_with_storage_domain.name ILIKE 'dc35' AND all_disks.disk_storage_type = '0' [2] SELECT * FROM all_disks WHERE (disk_id IN (SELECT all_disks.disk_id FROM all_disks LEFT OUTER JOIN storage_pool_with_storage_domain ON all_disks.storage_pool_id=storage_pool_with_storage_domain.id WHERE (storage_pool_with_storage_domain.name ILIKE 'dc35' AND all_disks.disk_storage_type = '0'))) Change-Id: I3a792fb63421c7589ed073fb18cfaac46a7dd3a9 Bug-Url: https://bugzilla.redhat.com/1124584 Bug-Url: https://bugzilla.redhat.com/1124593 Signed-off-by: Daniel Erez <de...@redhat.com> --- M backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/SyntaxContainer.java 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/59/30859/1 diff --git a/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/SyntaxContainer.java b/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/SyntaxContainer.java index 012b462..84853d8 100644 --- a/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/SyntaxContainer.java +++ b/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/SyntaxContainer.java @@ -23,6 +23,7 @@ public boolean isSearchUsingTags() { return mOrigText.contains("tag") || (getSearchObjectStr() != null && (getSearchObjectStr().equals(SearchObjects.VDC_USER_OBJ_NAME))) + || (getCrossRefObjList().contains(SearchObjects.VDC_STORAGE_POOL_OBJ_NAME)) || (getCrossRefObjList().contains(SearchObjects.VDC_STORAGE_DOMAIN_OBJ_NAME)); } -- To view, visit http://gerrit.ovirt.org/30859 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3a792fb63421c7589ed073fb18cfaac46a7dd3a9 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Daniel Erez <de...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches