Eli Mesika has posted comments on this change.

Change subject: core: Pinning vm to multiple hosts - persistency
......................................................................


Patch Set 1:

(4 comments)

https://gerrit.ovirt.org/#/c/41619/1/packaging/dbscripts/create_views.sql
File packaging/dbscripts/create_views.sql:

Line 3278: -- Dedicated Hosts view
Line 3279: CREATE
Line 3280: OR REPLACE VIEW dedicated_hosts_view AS
Line 3281: SELECT
Line 3282:     vds_static.vds_name, 
TWS
Line 3283:     dedicated_hosts.vds_id,
Line 3284:     dedicated_hosts.vm_id
Line 3285: FROM
Line 3286:     dedicated_hosts


https://gerrit.ovirt.org/#/c/41619/1/packaging/dbscripts/upgrade/03_06_1450_add_multiple_dedicated_hosts_to_vm.sql
File 
packaging/dbscripts/upgrade/03_06_1450_add_multiple_dedicated_hosts_to_vm.sql:

Line 1: -- Add new tables for pinning multiple hosts to vm
Line 2: Create or replace FUNCTION __temp_add_multiple_dedicated_hosts_to_vm() 
returns void
I see no value in using a SP here since all the code inside is simple 
statements that need no SP (you need a SP whe you have conditional logic for 
example ....)
Line 3: AS $procedure$
Line 4: BEGIN
Line 5:     -- dedicated_hosts nodes table
Line 6:     CREATE TABLE dedicated_hosts


Line 11:         CONSTRAINT fk_vm FOREIGN KEY(vm_id) REFERENCES 
vm_static(vm_guid) ON DELETE CASCADE
Line 12:     );
Line 13: 
Line 14:     -- Create partial index for numa nodes
Line 15:     CREATE INDEX fk_host ON dedicated_hosts(vds_id);
indexes has idx_ prefix fk_ is for foreign keys
Line 16:     CREATE INDEX fk_vm ON dedicated_hosts(vm_id);
Line 17: 
Line 18: END; $procedure$
Line 19: LANGUAGE plpgsql;


Line 12:     );
Line 13: 
Line 14:     -- Create partial index for numa nodes
Line 15:     CREATE INDEX fk_host ON dedicated_hosts(vds_id);
Line 16:     CREATE INDEX fk_vm ON dedicated_hosts(vm_id);
same
Line 17: 
Line 18: END; $procedure$
Line 19: LANGUAGE plpgsql;
Line 20: 


-- 
To view, visit https://gerrit.ovirt.org/41619
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If358803c75a57f908152f8fc43e901bcc14b13d0
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Dudi Maroshi <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to