Change in ovirt-engine[master]: core: Rm ChangeVDSClusterCommand#targetClusterCompatibilityV...

tnisan at redhat.com tnisan at redhat.com
Mon Oct 24 22:31:58 UTC 2016


Tal Nisan has submitted this change and it was merged.

Change subject: core: Rm ChangeVDSClusterCommand#targetClusterCompatibilityVersion
......................................................................


core: Rm ChangeVDSClusterCommand#targetClusterCompatibilityVersion

Calculating targetClusterCompatibilityVersion requires access to the
ClusterDao, and doing so in a data member means that DAO cannot be
injected. Since this member is only used in one place anyway, it makes
very little sense holding it as a member, so this patch inlines the
call.

Doing so has some advantages:
1. As mentioned above, it allows injecting the DAO
2. Performance: The command may fail its validation before the
   targetCluster is required. In this case, a database call is saved.

Change-Id: Ie01547f3b3e3b87dc6addd313e7d4f8ef418ebbf
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java
1 file changed, 1 insertion(+), 3 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved; Passed CI tests
  Martin Betak: Looks good to me, but someone else must approve
  Allon Mureinik: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie01547f3b3e3b87dc6addd313e7d4f8ef418ebbf
Gerrit-PatchSet: 9
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list