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 <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Sharad Mishra <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
Gerrit-Reviewer: liron aravot <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to