Eli Mesika has posted comments on this change.

Change subject: engine: Make VDSPartial, a partially loaded VDS object
......................................................................


Patch Set 8:

(11 comments)

....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDAO.java
Line 218:      */
Line 219:     VDS getPartial(Guid vdsId);
Line 220: 
Line 221:     /**
Line 222:      * Completes the retrieves of the partial instance
retrieves=>retrieve
Line 223:      * @param id
Line 224:      *            the id
Line 225:      * @return the PartialVDS instance
Line 226:      */


Line 223:      * @param id
Line 224:      *            the id
Line 225:      * @return the PartialVDS instance
Line 226:      */
Line 227:     void reloadVDS(VDS vds);
This should be called reloadPartial


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDAODbFacadeImpl.java
Line 348:     @Override
Line 349:     public VDS getPartial(Guid vdsId) {
Line 350:         VDS vdsPartial = new VDS();
Line 351: 
Line 352:         // TODO: From cache
When this should be done ?
Line 353:         
vdsPartial.setStaticData(DbFacade.getInstance().getVdsStaticDao().get(vdsId));
Line 354:         
vdsPartial.setDynamicData(DbFacade.getInstance().getVdsDynamicDao().get(vdsId));
Line 355:         // 
vdsPartial.setStatisticsData(DbFacade.getInstance().getVdsStatisticsDao().get(vdsId));
Line 356: 


Line 351: 
Line 352:         // TODO: From cache
Line 353:         
vdsPartial.setStaticData(DbFacade.getInstance().getVdsStaticDao().get(vdsId));
Line 354:         
vdsPartial.setDynamicData(DbFacade.getInstance().getVdsDynamicDao().get(vdsId));
Line 355:         // 
vdsPartial.setStatisticsData(DbFacade.getInstance().getVdsStatisticsDao().get(vdsId));
Why commented out ??, if not needed please remove
Line 356: 
Line 357:         // TODO: From cache
Line 358:         VDSGroup group = 
DbFacade.getInstance().getVdsGroupDao().get(vdsPartial.getVdsGroupId());
Line 359:         
vdsPartial.setVdsGroupCompatibilityVersion(group.getcompatibility_version());


Line 353:         
vdsPartial.setStaticData(DbFacade.getInstance().getVdsStaticDao().get(vdsId));
Line 354:         
vdsPartial.setDynamicData(DbFacade.getInstance().getVdsDynamicDao().get(vdsId));
Line 355:         // 
vdsPartial.setStatisticsData(DbFacade.getInstance().getVdsStatisticsDao().get(vdsId));
Line 356: 
Line 357:         // TODO: From cache
When this should be done ?
Line 358:         VDSGroup group = 
DbFacade.getInstance().getVdsGroupDao().get(vdsPartial.getVdsGroupId());
Line 359:         
vdsPartial.setVdsGroupCompatibilityVersion(group.getcompatibility_version());
Line 360:         vdsPartial.setVdsGroupCpuName(group.getcpu_name());
Line 361:         vdsPartial.setVdsGroupDescription(group.getdescription());


Line 363:         vdsPartial.setStoragePoolId(group.getStoragePoolId());
Line 364:         vdsPartial.setStoragePoolName(group.getStoragePoolName());
Line 365:         
vdsPartial.setMaxVdsMemoryOverCommit(group.getmax_vds_memory_over_commit());
Line 366: 
Line 367:         // TODO: From cache?!?
When this should be done ?
Line 368:         // 
vdsPartial.setVdsSpmId(DbFacade.getInstance().getVdsSpmIdMapDao().get(vdsId).getvds_spm_id());
Line 369: 
Line 370:         return vdsPartial;
Line 371:     }


Line 364:         vdsPartial.setStoragePoolName(group.getStoragePoolName());
Line 365:         
vdsPartial.setMaxVdsMemoryOverCommit(group.getmax_vds_memory_over_commit());
Line 366: 
Line 367:         // TODO: From cache?!?
Line 368:         // 
vdsPartial.setVdsSpmId(DbFacade.getInstance().getVdsSpmIdMapDao().get(vdsId).getvds_spm_id());
Why commented out ?
Line 369: 
Line 370:         return vdsPartial;
Line 371:     }
Line 372: 


Line 370:         return vdsPartial;
Line 371:     }
Line 372: 
Line 373:     @Override
Line 374:     public void reloadVDS(VDS vds) {
reloadVDS=>reloadPartial
Line 375:         
vds.setStatisticsData(DbFacade.getInstance().getVdsStatisticsDao().get(vds.getId()));
Line 376: 
Line 377:         // TODO: From cache
Line 378:         VDSGroup group = 
DbFacade.getInstance().getVdsGroupDao().get(vds.getVdsGroupId());


Line 373:     @Override
Line 374:     public void reloadVDS(VDS vds) {
Line 375:         
vds.setStatisticsData(DbFacade.getInstance().getVdsStatisticsDao().get(vds.getId()));
Line 376: 
Line 377:         // TODO: From cache
same
Line 378:         VDSGroup group = 
DbFacade.getInstance().getVdsGroupDao().get(vds.getVdsGroupId());
Line 379:         
vds.setVdsGroupCompatibilityVersion(group.getcompatibility_version());
Line 380:         vds.setVdsGroupCpuName(group.getcpu_name());
Line 381:         vds.setVdsGroupDescription(group.getdescription());


Line 383:         vds.setStoragePoolId(group.getStoragePoolId());
Line 384:         vds.setStoragePoolName(group.getStoragePoolName());
Line 385:         
vds.setMaxVdsMemoryOverCommit(group.getmax_vds_memory_over_commit());
Line 386: 
Line 387:         // TODO: From cache?!?
same
Line 388:         
vds.setVdsSpmId(DbFacade.getInstance().getVdsSpmIdMapDao().get(vds.getId()).getvds_spm_id());
Line 389: 
Line 390:     }


....................................................
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
Line 491:                      */
Line 492:                 }
Line 493:             } else {
Line 494:                 // refresh dynamic data
Line 495:                 // _vds = loadVDS(_vds.getId());
why this is commented ?
Line 496:                 final AtomicBoolean processHardwareNeededAtomic = new 
AtomicBoolean();
Line 497:                 VDSStatus refreshReturnStatus =
Line 498:                         
_vdsManager.refreshCapabilities(processHardwareNeededAtomic, _vds);
Line 499:                 processHardwareCapsNeeded = 
processHardwareNeededAtomic.get();


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie2401686d43daa6bcfb810b13aea6cc2570e5520
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liran Zelkha <liran.zel...@gmail.com>
Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com>
Gerrit-Reviewer: Eli Mesika <elimes...@gmail.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Liran Zelkha <liran.zel...@gmail.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@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

Reply via email to