Maor Lipchuk has posted comments on this change.

Change subject: core: add the image block alignment scan
......................................................................


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

(3 inline comments)

Partial reviewed

Compilation will fail since the enum class should be updated at Common.gwt.xml

Disks tab will not present disks because setLastAlignmentScan will throw NPE

DiskImageDynamicDAOTest and BaseDiskDaoTest will fail when running 
engine-dao-tests

....................................................
File backend/manager/dbscripts/upgrade/03_02_0480_base_disks_alignment.sql
Line 1: select fn_db_add_column('base_disks', 'alignment', 'smallint default 
0');
Line 2: select fn_db_add_column('base_disks', 'last_alignment_scan', 'timestamp 
with time zone');
Line 3: insert into action_version_map values (231, '3.3', '*');
Please remember to change the number of the script accordingly when merging 
(Should be 0490 now)


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/DiskAlignment.java
Line 1: package org.ovirt.engine.core.common.businessentities;
You need to add this enum to Common.gwt.xml, or else it will not pass 
compilation
Line 2: 
Line 3: import java.util.HashMap;
Line 4: import java.util.Map;
Line 5: 


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/AbstractBaseDiskRowMapper.java
Line 34: 
Line 35:         disk.setShareable(rs.getBoolean("shareable"));
Line 36:         disk.setBoot(rs.getBoolean("boot"));
Line 37:         
disk.setAlignment(DiskAlignment.forValue(rs.getInt("alignment")));
Line 38:         
disk.setLastAlignmentScan(DbFacadeUtils.fromDate(rs.getTimestamp("last_alignment_scan")));
What if last_alignment_scan will be null. We will get an NPE when we will use 
setLastAlignmentScan since there is uses scan method.
Line 39: 
Line 40:         return disk;
Line 41:     }
Line 42: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4858b7bbfa453230fcafecfbc5358c715d5d825b
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to