Allon Mureinik has posted comments on this change.

Change subject: core: Report storage size closer to reality
......................................................................


Patch Set 2:

(3 comments)

http://gerrit.ovirt.org/#/c/37428/2/packaging/dbscripts/inst_sp.sql
File packaging/dbscripts/inst_sp.sql:

Line 69:     where not exists (select id from storage_domain_static where id = 
v_storage_domain_id);
Line 70: 
Line 71:     -- Adding a proper storage domain dynamic entry
Line 72:     insert into storage_domain_dynamic(id, available_disk_size, 
used_disk_size)
Line 73:     select v_storage_domain_id, -1, -1
>From a database standpoint, it's cleaner to use NULLs that these magic numbers
Line 74:     where not exists (select id from storage_domain_dynamic where id = 
v_storage_domain_id);
Line 75: 
Line 76: END; $procedure$
Line 77: LANGUAGE plpgsql;


http://gerrit.ovirt.org/#/c/37428/2/packaging/dbscripts/upgrade/03_06_0870_set_glance_sotrage_size_to_NA.sql
File packaging/dbscripts/upgrade/03_06_0870_set_glance_sotrage_size_to_NA.sql:

Line 1: UPDATE storage_domain_dynamic
Line 2: SET available_disk_size = -1, used_disk_size = -1
>From a database standpoint, it's cleaner to use NULLs that these magic numbers
Line 3: FROM storage_domain_static, providers
Line 4: WHERE  storage_domain_dynamic.id = storage_domain_static.id AND
Line 5:     storage_domain_static.storage = CAST(providers.id AS VARCHAR) AND


Line 2: SET available_disk_size = -1, used_disk_size = -1
Line 3: FROM storage_domain_static, providers
Line 4: WHERE  storage_domain_dynamic.id = storage_domain_static.id AND
Line 5:     storage_domain_static.storage = CAST(providers.id AS VARCHAR) AND
Line 6:     provider_type = 'OPENSTACK_IMAGE';
Can you align the arguments please?

    UPDATE storage_domain_dynamic
    SET    available_disk_size = NULL

etc...


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I758febd3b6b1a1f13ae4e48635bf185ea81d918b
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vered Volansky <vvola...@redhat.com>
Gerrit-Reviewer: Ala Hino <ah...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Amit Aviram <aavi...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Freddy Rolland <froll...@redhat.com>
Gerrit-Reviewer: Idan Shaby <ish...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
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