Daniel Erez has posted comments on this change. Change subject: core: sync luns info after ConnectStorageServer ......................................................................
Patch Set 7: (2 comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/SyncLunsInfoForIscsiStorageDomainCommand.java Line 16: import org.ovirt.engine.core.utils.transaction.TransactionSupport; Line 17: Line 18: /** Line 19: * Synchronize LUN details comprising the storage domain with the DB Line 20: */ the storage domain is locked by the parent command (e.g. ActivateStorageDomainCommand). Line 21: @InternalCommandAttribute Line 22: @NonTransactiveCommandAttribute(forceCompensation = true) Line 23: public class SyncLunsInfoForIscsiStorageDomainCommand<T extends StorageDomainParametersBase> extends StorageDomainCommandBase<T> { Line 24: Line 45: Line 46: setSucceeded(true); Line 47: } Line 48: Line 49: protected void refreshLunsInfo(List<LUNs> lunsFromVgInfo, List<LUNs> lunsFromDb) { won't it (potentially) result in more db operations? why perform a db operation when we have an indication whether to perform it? Line 50: for (LUNs lunFromVgInfo : lunsFromVgInfo) { Line 51: // Update LUN Line 52: if (getLunDao().get(lunFromVgInfo.getLUN_id()) == null) { Line 53: getLunDao().save(lunFromVgInfo); -- To view, visit http://gerrit.ovirt.org/17919 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5867ad8d36f329e23c611079512be30a9c5f83a5 Gerrit-PatchSet: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Alissa Bonas <abo...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> 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