Maor Lipchuk has posted comments on this change.

Change subject: engine: SearchQuery generates slow query on vds_with_tags and 
storage_domains
......................................................................


Patch Set 9:

(2 comments)

....................................................
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/SearchQueryTest.java
Line 330:         return query.toString();
Line 331: 
Line 332:         // return ".*" + 
search.getDefaultSort(SearchObjects.GLUSTER_VOLUME_OBJ_NAME) + ".*"
Line 333:         // + 
search.getRelatedTableNameWithOutTags(SearchObjects.GLUSTER_VOLUME_OBJ_NAME) + 
".* "
Line 334:         // + 
search.getPrimeryKeyName(SearchObjects.GLUSTER_VOLUME_OBJ_NAME) + ".*";
As Eli commented at the previous patch set, please remove the commented code.
Line 335:     }
Line 336: 
Line 337:     /**
Line 338:      * Regex string which contains all of the Network properties.


....................................................
File 
backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/SyntaxChecker.java
Line 893:             String tableNameWithOutTags = 
mSearchObjectAC.getRelatedTableNameWithOutTags(searchObjStr);
Line 894: 
Line 895:             boolean generalQuery = false;
Line 896:             String innerQuery;
Line 897:             if (!wherePhrase.toString().contains("tag_name")
I would use a constant for "tag_name" and probably worth to make it referenced 
from the other references in the searchbackend package, so it will be clear 
that this is dependent. (For example in VdcUserConditionFieldAutoCompleter)

Eli mentioned it before, how you can be sure the where clause will not contain 
the string tag_name (For example VM or Host with the name "tag_name" or other)
Line 898:                     && !wherePhrase.toString().contains(".")
Line 899:                     && 
(searchObjStr.equals(SearchObjects.VDS_OBJ_NAME) || 
searchObjStr.equals(SearchObjects.VDC_STORAGE_DOMAIN_OBJ_NAME))) {
Line 900:                 innerQuery =
Line 901:                         StringFormat.format("SELECT %1$s.%2$s FROM 
%3$s %4$s",


-- 
To view, visit http://gerrit.ovirt.org/20914
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia0b7a4912d031c4cdafd636126730ea81d8d2bdd
Gerrit-PatchSet: 9
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to