Maor Lipchuk has posted comments on this change.

Change subject: core: add memory volume to snapshot entity
......................................................................


Patch Set 17: (2 inline comments)

....................................................
File 
backend/manager/dbscripts/upgrade/03_03_0172_add_memory_volume_column_snapshots.sql
Line 1: --Add memory volume into snapshots
Line 2: SELECT fn_db_add_column('snapshots', 'memory_volume', 'character 
varying(255)');
I would use here a default value of empty String to avoid nulls and the check 
which being done in the snapshot class.

I would also add a script which changes the existing VMs snapshots to empty 
string

(If done so perhaps also adding a not null value will be better)


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/SnapshotDaoDbFacadeImpl.java
Line 201:                 parameterSource);
Line 202:     }
Line 203: 
Line 204:     private String getNullableRepresentation(String memoryVolume) {
Line 205:         return memoryVolume.isEmpty() ? null : memoryVolume;
Isn't memory volume could be null for VMs which were existed before this 
change? 
If this is the case you will get here an NPE
Line 206:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iecda4c491fe6e207386edf2a9bf2488ec81a332a
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to