Liron Aravot has posted comments on this change.

Change subject: core: NPEs and wrong persisted information when reusing LUNs
......................................................................


Patch Set 9: (5 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageDomainCommandBase.java
Line 233:     public static void proceedLUNInDb(final LUNs lun, StorageType 
storageType, String volumeGroupId) {
Line 234:         if (DbFacade.getInstance().getLunDao().get(lun.getLUN_id()) 
== null) {
Line 235:             DbFacade.getInstance().getLunDao().save(lun);
Line 236:         } else if (!volumeGroupId.isEmpty()){
Line 237:             
DbFacade.getInstance().getLunDao().updateLUNsVolumeGroupId(lun.getLUN_id(), 
volumeGroupId);
Done
Line 238:         }
Line 239: 
Line 240:         for (storage_server_connections connection : 
lun.getLunConnections()) {
Line 241:             List<storage_server_connections> connections = 
DbFacade.getInstance()


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHelperBase.java
Line 129:         final List<LUNs> lunsList = 
DbFacade.getInstance().getLunDao().getAllForVolumeGroup(storageDomain.getstorage());
Line 130:         int numOfRemovedLuns = 0;
Line 131:         for (LUNs lun : lunsList) {
Line 132:             if 
(DbFacade.getInstance().getDiskLunMapDao().getDiskIdByLunId(lun.getLUN_id()) == 
null) {
Line 133:                 
DbFacade.getInstance().getLunDao().remove(lun.getLUN_id());
Done
Line 134:                 numOfRemovedLuns++;
Line 135:             } else {
Line 136:                 
DbFacade.getInstance().getLunDao().updateLUNsVolumeGroupId(lun.getLUN_id(), "");
Line 137:             }


Line 132:             if 
(DbFacade.getInstance().getDiskLunMapDao().getDiskIdByLunId(lun.getLUN_id()) == 
null) {
Line 133:                 
DbFacade.getInstance().getLunDao().remove(lun.getLUN_id());
Line 134:                 numOfRemovedLuns++;
Line 135:             } else {
Line 136:                 
DbFacade.getInstance().getLunDao().updateLUNsVolumeGroupId(lun.getLUN_id(), "");
Done
Line 137:             }
Line 138:         }
Line 139:         return numOfRemovedLuns;
Line 140:     }


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/LunDAODbFacadeImpl.java
Line 46:         return getCallsHandler().executeRead("GetLUNByLUNId", MAPPER, 
parameterSource);
Line 47:     }
Line 48: 
Line 49:     @Override
Line 50:     public void updateLUNsVolumeGroupId(String id, String 
volumeGroupId) {
Done
Line 51:         MapSqlParameterSource parameterSource = 
getCustomMapSqlParameterSource().addValue("LUN_id", id)
Line 52:                 .addValue("volume_group_id", volumeGroupId);
Line 53: 
Line 54:         
getCallsHandler().executeModification("UpdateLUNsVolumeGroupId", 
parameterSource);


Line 62: 
Line 63:         return 
getCallsHandler().executeReadList("GetLUNsBystorage_server_connection", MAPPER, 
parameterSource);
Line 64:     }
Line 65: 
Line 66:     @Override
Done
Line 67:     public List<LUNs> getAllForVolumeGroup(String id) {
Line 68:         MapSqlParameterSource parameterSource = 
getCustomMapSqlParameterSource()
Line 69:                 .addValue("volume_group_id", id);
Line 70: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I38a0e3c68cb8bd80c2f78ee5aacfccc8c987a79e
Gerrit-PatchSet: 9
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <lara...@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: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to