Tal Nisan has submitted this change and it was merged.

Change subject: core: Add fk constraint on vm_interface_statistics
......................................................................


core: Add fk constraint on vm_interface_statistics

Once a network interface is being removed from the Data Base its
corresponding statistics data in _vm_interface_statistics should be
removed also.

Currently, when a Storge Domain is being detached from a Data Center, all the 
data related
to it is being removed from the Data Base.

Since there is no foreign key between vm_interface and
vm_interface_statistics which does cascade delete there are left overs
which are left in vm_interface_statistics although the vm_interface was
deleted.

also, remove redundant vm interface statistic without VM.
Changing the test accordingly.

Change-Id: I53cf2737ef91cf967c93990fcb237f6c4e12a8f8
Bug-Url: https://bugzilla.redhat.com/1197348
Signed-off-by: Maor Lipchuk <[email protected]>
---
M 
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/network/VmNetworkStatisticsDaoTest.java
M backend/manager/modules/dal/src/test/resources/fixtures.xml
A 
packaging/dbscripts/upgrade/03_05_1240_add_delete_contraint_vm_interface_statistics.sql
3 files changed, 6 insertions(+), 11 deletions(-)

Approvals:
  Allon Mureinik: Looks good to me, approved
  Maor Lipchuk: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I53cf2737ef91cf967c93990fcb237f6c4e12a8f8
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to