Eli Mesika has posted comments on this change. Change subject: gluster: BLL queries for volume snapshots list and count ......................................................................
Patch Set 13: Code-Review-1 (3 comments) http://gerrit.ovirt.org/#/c/35674/13/packaging/dbscripts/gluster_volume_snapshot_sp.sql File packaging/dbscripts/gluster_volume_snapshot_sp.sql: Line 121: v_record vsc_rs; Line 122: v_cur CURSOR FOR SELECT volume_id, count(volume_id) FROM gluster_volume_snapshots Line 123: WHERE snapshot_id IN (SELECT * FROM fnSplitterUuid(v_snapshot_ids)) GROUP BY volume_id; Line 124: BEGIN Line 125: DELETE FROM gluster_volume_snapshots Please align Line 126: WHERE snapshot_id in (select * from fnSplitterUuid(v_snapshot_ids)); Line 127: Line 128: OPEN v_cur; Line 129: LOOP Line 129: LOOP Line 130: FETCH v_cur INTO v_record; Line 131: EXIT WHEN NOT FOUND; Line 132: UPDATE gluster_volumes Line 133: SET snapshot_count = snapshot_count - v_record.del_count I don't understand this v_record is defined as vsc_rs type which has : volume_id UUID, snapshot_count integer so , what is v_record.del_count ??? should that be v_record.snapshot_count ???? Please try to verify , this SP should exit with error ... Line 134: WHERE id = v_record.volume_id; Line 135: END LOOP; Line 136: CLOSE v_cur; Line 137: END; $procedure$ http://gerrit.ovirt.org/#/c/35674/13/packaging/dbscripts/gluster_volumes_sp.sql File packaging/dbscripts/gluster_volumes_sp.sql: Line 610: Create or replace FUNCTION GetSnapshotCount(v_volume_id UUID) Line 611: RETURNS SETOF INTEGER STABLE Line 612: AS $procedure$ Line 613: BEGIN Line 614: RETURN QUERY SELECT snapshot_count 4 spaces instead of TAB Line 615: FROM gluster_volumes Line 616: WHERE id = v_volume_id; Line 617: END; $procedure$ -- To view, visit http://gerrit.ovirt.org/35674 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I00cd2a52c9bd10946b8702d833d6f8f0ebb3f848 Gerrit-PatchSet: 13 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shubhendu Tripathi <shtri...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com> Gerrit-Reviewer: Sahina Bose <sab...@redhat.com> Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@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