sathvikaragi commented on code in PR #14259:
URL: https://github.com/apache/cloudstack/pull/14259#discussion_r4257732594
##########
server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java:
##########
@@ -1446,11 +1446,12 @@ public VolumeVO resizeVolume(ResizeVolumeCmd cmd)
throws ResourceAllocationExcep
if (currentSize != newSize ||
!compareEqualsIncludingNullOrZero(newMaxIops, volume.getMaxIops()) ||
!compareEqualsIncludingNullOrZero(newMinIops, volume.getMinIops())) {
volumeResizeRequired = true;
}
- if (!volumeMigrateRequired && !volumeResizeRequired &&
newDiskOffering != null) {
- _volsDao.updateDiskOffering(volume.getId(),
newDiskOffering.getId());
+ if (!volumeMigrateRequired && !volumeResizeRequired) {
volume = _volsDao.findById(volume.getId());
Review Comment:
volume is now fetched here only after the DB update to pass on to
updateStorageWithTheNewDiskOffering(volume, newDiskOffering);
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]