From b35b30ecb7653759d6272f4ac9b0dca37b987746 Mon Sep 17 00:00:00 2001 From: Anshul Gangwar Date: Tue, 13 Jan 2015 16:35:10 +0530 Subject: [PATCH] CLOUDSTACK-6900: In findByStoreVolume method of VolumeDataStoreDao now listing only those volumes whose download_url is not generated in volume_store_ref. This will not affect migrate operations as in that case download_url is never generated In case of download volume operation that is only set when volume reached to ready state in volume_store_ref table. After that this row is not listed through this method so it will not affect in that case also. --- .../cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java b/engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java index b71eb2c23240..1231518a8385 100644 --- a/engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java +++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java @@ -83,6 +83,7 @@ public boolean configure(String name, Map params) throws Configu storeVolumeSearch.and("store_id", storeVolumeSearch.entity().getDataStoreId(), SearchCriteria.Op.EQ); storeVolumeSearch.and("volume_id", storeVolumeSearch.entity().getVolumeId(), SearchCriteria.Op.EQ); storeVolumeSearch.and("destroyed", storeVolumeSearch.entity().getDestroyed(), SearchCriteria.Op.EQ); + storeVolumeSearch.and("download_url", storeVolumeSearch.entity().getExtractUrl(), Op.NULL); storeVolumeSearch.done(); updateStateSearch = this.createSearchBuilder();