Liron Aravot has posted comments on this change.

Change subject: core: Fix IndexOutOfBoundsException in plug FC disk
......................................................................


Patch Set 2: (1 inline comment)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AbstractDiskVmCommand.java
Line 74:      * @param lun
Line 75:      *            - The lun we set the connection at
Line 76:      * @return The storage type of the lun (ISCSI or FCP)
Line 77:      */
Line 78:     private StorageType updateLUNConnectionsInfo(LUNs lun) {
I still don't like that name, updateConnectionsInfo is just about loading 
connections..i don't think that it's related with return the storage type.

by the way,for only getting the type (which is the usecase of this method)  i 
think that you should add a check to see if the connection list is already 
loaded, if it is - you can just return the type , no need to load it again from 
db if it was loaded during can do action in some command for example.
Line 79:         lun.setLunConnections(new 
ArrayList<storage_server_connections>(getDbFacade()
Line 80:                 .getStorageServerConnectionDao()
Line 81:                 .getAllForLun(lun.getLUN_id())));
Line 82:         return lun.getLunConnections().isEmpty() ? StorageType.FCP : 
lun.getLunConnections().get(0).getstorage_type();


--
To view, visit http://gerrit.ovirt.org/9724
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6414445b9a74be299205ff7fc9a21d1388a29687
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Ayal Baron <aba...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Sharad Mishra <snmis...@linux.vnet.ibm.com>
Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com>
Gerrit-Reviewer: liron aravot <liron.ara...@gmail.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to