From Arik Hadas <ahadas(a)redhat.com>:
Arik Hadas has submitted this change and it was merged.
Change subject: core: VmTemplate.actualDiskSize property not cached
......................................................................
core: VmTemplate.actualDiskSize property not cached
The problem with #actualDiskSize field was that it needed to be marked
as @EditableVmTemplateField to allow UpdateVmTemplateCommand to be
called with new template both with and without `diskImageMap` property
set. This annotation was required even-though no disk related changes
were actually performed by the UpdateVmTemplateCommand.
Related bugs:
https://bugzilla.redhat.com/1417597
https://bugzilla.redhat.com/1409579
From now on VmTemplate.actualDiskSize is a computed property based on
`diskImageMap` property.
The only code that calls getActualDiskSize() repeatedly is
VmTemplateComparerByDiskSize. Cache of `actualDiskSize` values was
introduced in this class.
Change-Id: Ie2011fa8a63c304c220be7a326c4142d81f7cd34
Signed-off-by: Jakub Niedermertl <jniederm(a)redhat.com>
---
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/comparators/VmTemplateComparerByDiskSize.java
2 files changed, 20 insertions(+), 17 deletions(-)
Approvals:
Jakub Niedermertl: Verified
Jenkins CI: Passed CI tests
Arik Hadas: Looks good to me, approved
--
To view, visit
https://gerrit.ovirt.org/71572
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie2011fa8a63c304c220be7a326c4142d81f7cd34
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Jakub Niedermertl <jniederm(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Jakub Niedermertl <jniederm(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>