nitin-maharana commented on a change in pull request #868: CLOUDSTACK-8894: 
Restrict vGPU enabled VMs dynamic scaling if new service offering has different 
vGPU type
URL: https://github.com/apache/cloudstack/pull/868#discussion_r113858287
 
 

 ##########
 File path: server/src/com/cloud/vm/UserVmManagerImpl.java
 ##########
 @@ -1661,6 +1661,19 @@ private boolean upgradeRunningVirtualMachine(Long vmId, 
Long newServiceOfferingI
                     + ",memory=," + currentMemory + ")");
         }
 
+        _offeringDao.loadDetails(currentServiceOffering);
 
 Review comment:
   For a bit of improvement, before loading, we can check if the value is 
already loaded then we can skip this, else load it. Something like this.
   
   if(currentServiceOffering.getDetails() == null) {
   _offeringDao.loadDetails(currentServiceOffering);
   }
   
   Same for newServiceOffering.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to