Liron Ar has posted comments on this change.

Change subject: engine: Modify GetAllConnectableStorageConnections procedure 
and DAO
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.ovirt.org/#/c/24497/1/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/StorageServerConnectionDAODbFacadeImpl.java
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/StorageServerConnectionDAODbFacadeImpl.java:

Line 47:     }
Line 48: 
Line 49:     @Override
Line 50:     public List<StorageServerConnections> 
getConnectableStorageConnectionsByStorageType(Guid pool,
Line 51:                                                                        
                 StorageType storageType) {
please return this method and have the implementation just call the newly added 
one with "null" as type- will remove the modificiation in all the current calls 
and is clearer.
Line 52:         return 
getCallsHandler().executeReadList("GetConnectableStorageConnectionsByStorageType",
Line 53:                 mapper,
Line 54:                 getCustomMapSqlParameterSource()
Line 55:                         .addValue("storage_pool_id", pool)


Line 52:         return 
getCallsHandler().executeReadList("GetConnectableStorageConnectionsByStorageType",
Line 53:                 mapper,
Line 54:                 getCustomMapSqlParameterSource()
Line 55:                         .addValue("storage_pool_id", pool)
Line 56:                         .addValue("storage_type", (storageType != 
null) ? storageType.getValue() : null));
tests for the new usecases?
Line 57:     }
Line 58: 
Line 59:     @Override
Line 60:     public List<StorageServerConnections> getAllForVolumeGroup(String 
group) {


http://gerrit.ovirt.org/#/c/24497/1/packaging/dbscripts/storages_san_sp.sql
File packaging/dbscripts/storages_san_sp.sql:

Line 540:    LUN_storage_server_connection_map LUN_storage_server_connection_map
Line 541:    INNER JOIN  LUNs ON LUN_storage_server_connection_map.LUN_id = 
LUNs.LUN_id
Line 542:    INNER JOIN  storage_domains ON LUNs.volume_group_id = 
storage_domains.storage
Line 543:    INNER JOIN  storage_server_connections ON 
LUN_storage_server_connection_map.storage_server_connection = 
storage_server_connections.id
Line 544:    WHERE     (storage_domains.storage_pool_id = v_storage_pool_id  
and storage_domains.status in(0,3,4) and (v_storage_type is NULL or 
storage_domains.storage_type = v_storage_type))
all of the current query should be now an inner query with this condition added 
"outside" rather than repeat it twice..

select * from (select...) where v_storage_type is NULL or 
storage_domains.storage_type = v_storage_type
Line 545:    UNION
Line 546:    SELECT distinct storage_server_connections.*
Line 547:    FROM         storage_server_connections
Line 548:    INNER JOIN  storage_domains ON storage_server_connections.id = 
storage_domains.storage


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9cea901ff2707bb4caa52e8f8eff06d533d5ddb6
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sergey Gotliv <sgot...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgot...@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