Change in ovirt-engine[master]: core: update lun's info on any property change

derez at redhat.com derez at redhat.com
Thu Sep 1 08:54:19 UTC 2016


Daniel Erez has submitted this change and it was merged.

Change subject: core: update lun's info on any property change
......................................................................


core: update lun's info on any property change

When syncing DB LUNs with the information from the storage, if the LUNs'
IDs are different we save a new LUN, and if the LUN's size was changed,
we update the existing one.

This approach ignores other fields that may have changed, so that:
* If another field which is not the LUN's size was changed, the LUN will
  not be updated.
* If the LUN's size was changed, the lun will be updated, along with
  other fields that were changed.

This patch takes a new approach - getLunsToUpdateInDb returns the LUNs
that require a DB update and updateLunsInDb always updates these LUNs
in the DB (or saves new ones if the ID was changed).
Therefore, adding more filters to getLunsToUpdateInDb (like LUNId and
deviceSize) will possibly cause more LUNs to be updated in the DB.

Change-Id: I9cfd28001fe065001669040ba010d2ee54ac876d
Signed-off-by: Idan Shaby <ishaby at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/domain/SyncLunsInfoForBlockStorageDomainCommand.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/domain/SyncLunsInfoForBlockStorageDomainCommandTest.java
2 files changed, 64 insertions(+), 42 deletions(-)

Approvals:
  Jenkins CI: Passed CI tests
  Daniel Erez: Looks good to me, approved
  Idan Shaby: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9cfd28001fe065001669040ba010d2ee54ac876d
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list