Yair Zaslavsky has posted comments on this change. Change subject: core:AddVdsSpmIdCommand throw exception when... ......................................................................
Patch Set 2: (1 inline comment) .................................................... File backend/manager/dbscripts/vds_spm_id_map_sp.sql Line 17: v_vds_spm_id:=1; Line 18: IF EXISTS (SELECT 1 FROM vds_spm_id_map WHERE storage_pool_id = v_storage_pool_id) THEN Line 19: --Try to get the first hole if exists , for example if we have vds_spm_id 1,2,4 then 3 will be returned Line 20: v_vds_spm_id:= spm_id_sequence Line 21: FROM generate_series(1, 100000) as spm_id_sequence -- assume no more than 100000 hosts per DC I think the limitation on the id number should be away smaller. I think it's 255 - but you should ask one of the VDSM developers. Line 22: WHERE spm_id_sequence NOT IN (SELECT vds_spm_id FROM vds_spm_id_map WHERE storage_pool_id = v_storage_pool_id) LIMIT 1; Line 23: -- If no holes found, generates next spm id as count+1 Line 24: IF (v_vds_spm_id IS NULL) THEN Line 25: v_vds_spm_id:=count(storage_pool_id) + 1 FROM vds_spm_id_map WHERE storage_pool_id = v_storage_pool_id; -- To view, visit http://gerrit.ovirt.org/11271 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7f8aa6b6cb3dfc1508a99c53553afc2e15009b68 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches