Allon Mureinik has posted comments on this change.

Change subject: engine:Validate maximum number of hosts in DC.(#771699)
......................................................................


Patch Set 8: I would prefer that you didn't submit this

(4 inline comments)

See inline.

Don't fell /that/ strongly about any of them, except create_db_devel.sh, which 
I assume is just a git foobar.

....................................................
File backend/manager/dbscripts/create_db_devel.sh
Line 2: #include db general functions
Line 3: source ./dbfunctions.sh
Line 4: 
Line 5: SERVERNAME="localhost"
Line 6: DATABASE="engine_test"
why?
Line 7: USERNAME="postgres"
Line 8: PORT="5432"
Line 9: 
Line 10: usage() {


....................................................
File backend/manager/dbscripts/vds_sp.sql
Line 804: 
Line 805: Create or replace FUNCTION 
GetVdsCountByStoragePoolId(v_storage_pool_id UUID, v_user_id UUID, 
v_is_filtered boolean) RETURNS integer
Line 806:    AS $procedure$
Line 807: BEGIN
Line 808:       RETURN (SELECT COUNT(*) FROM 
GetVdsByStoragePoolId(v_storage_pool_id, v_user_id, v_is_filtered));
I'd lose the brackets
Line 809: END; $procedure$
Line 810: LANGUAGE plpgsql;
Line 811: 
Line 812: 


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDAODbFacadeImpl.java
Line 150:     @Override
Line 151:     public Integer getVdsCountByStoragePoolId(Guid storagePool) {
Line 152:         ParameterizedRowMapper<Integer> mapper = new 
ParameterizedRowMapper<Integer>() {
Line 153:             @Override
Line 154:             public Integer mapRow(ResultSet rs, int rowNum) throws 
SQLException {
here too - define mapRow as returning int, and just return rs.getInt()
Line 155:                 Integer result = rs.getInt(1);
Line 156:                 return result;
Line 157:             }
Line 158:         };


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDAO.java
Line 163:      * @param storagePool The storage pool's ID
Line 164:      * @return vds count in the given storage pool
Line 165:      */
Line 166:     Integer getVdsCountByStoragePoolId(Guid storagePool);
Line 167:     /**
since we know this can't be null (as you stated), I think an int would be 
superior - it's treated as an int the entire time after this, and you won't 
leave the developer wondering how/if this can be null.
Line 168:      * Retrieves all VDS instances in the given Storage Pool, that 
are in status "UP"
Line 169:      * ordered by their vds_spm_priority, not including -1
Line 170:      * @return the list of VDS instances
Line 171:      */


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie1ef2ce160bc9ee4855b310c9d170ef7c14a0a17
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to