Lior Vernia has posted comments on this change. Change subject: core: Fix splitting logic for ip addresses ......................................................................
Patch Set 3: (2 comments) https://gerrit.ovirt.org/#/c/36946/3/packaging/dbscripts/create_functions.sql File packaging/dbscripts/create_functions.sql: Line 893: CREATE OR REPLACE FUNCTION fn_get_comparable_ip_list(text) RETURNS inet[] IMMUTABLE STRICT Line 894: AS $procedure$ Line 895: BEGIN Line 896: CASE Line 897: WHEN ($1 IS NULL) OR ($1 ~ E'^\\s*$') THEN Note that this probably breaks functionality on some versions of psql. See https://bugzilla.redhat.com/show_bug.cgi?id=1119214 and how things were fixed in that case. It should have been clear that this isn't a simple error, when this sorting had been verified in the past... Line 898: RETURN NULL; Line 899: ELSE Line 900: RETURN regexp_split_to_array(trim(both from $1), E'\\s+')::inet[]; Line 901: END CASE; https://gerrit.ovirt.org/#/c/36946/3/packaging/dbscripts/create_views.sql File packaging/dbscripts/create_views.sql: Line 977: vm_templates.num_of_sockets * vm_templates.cpu_per_socket AS vmt_num_of_cpus, Line 978: vm_templates.description AS vmt_description, Line 979: vm_dynamic.status AS status, Line 980: vm_dynamic.vm_ip AS vm_ip, Line 981: fn_get_comparable_ip_list(vm_ip) as vm_ip_inet_array, I still don't like this to workaround the DISTINCT parameter, but after talking to ofrenkel and closely looking at how our search mechanism works, I'm convinced that there's no simple alternative. So I'm fine with this. (the problem with the search is that it sifts through a view comprising tons of columns instead of directly querying the DB using the search parameters - this could have solved the issue with duplicate search results entries) Line 982: vm_dynamic.vm_host AS vm_host, Line 983: vm_dynamic.vm_pid AS vm_pid, Line 984: vm_dynamic.last_start_time AS last_start_time, Line 985: vm_dynamic.guest_cur_user_name AS guest_cur_user_name, -- To view, visit https://gerrit.ovirt.org/36946 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6923e1d99185e9aca69036edda00293ed1718b92 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Frank Kobzik <fkob...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Frank Kobzik <fkob...@redhat.com> Gerrit-Reviewer: Lior Vernia <lver...@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