Github user anshul1886 commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/803#discussion_r39361975
  
    --- Diff: 
engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java
 ---
    @@ -350,4 +351,20 @@ public void expireDnldUrlsForZone(Long dcId){
             return listIncludingRemovedBy(sc);
         }
     
    +    @Override
    +    public boolean updateVolumeId(long srcVolId, long destVolId) {
    +        TransactionLegacy txn = TransactionLegacy.currentTxn();
    +        try {
    +            VolumeDataStoreVO volumeDataStoreVO = findByVolume(srcVolId);
    +            if(volumeDataStoreVO != null) {
    +                txn.start();
    +                volumeDataStoreVO.setVolumeId(destVolId);
    +                update(volumeDataStoreVO.getId(), volumeDataStoreVO);
    +                txn.commit();
    +            }
    +        } catch (Exception e) {
    --- End diff --
    
    Updated the code to embed the exception in CloudRuntimeException.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to